LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Shell Script to parse system performance. (https://www.linuxquestions.org/questions/linux-newbie-8/shell-script-to-parse-system-performance-4175487300/)

ShevyRoots 12-08-2013 12:34 PM

Shell Script to parse system performance.
 
Need help with creating a shell script to parse and display performance stat to the screen.
cd to /stats/ and they are many performance related state under the stats dir. How do I view call related stats? Example, I have three nodes reporting wireless call related stats and would like a script that can parse the stats/sysgrp files that are created every 15mins and report which node experienced wireless call failures.

Thanks in advance!!
ShevyRoots

unSpawn 12-08-2013 01:11 PM

Welcome to LQ. Hope you like it here.


Quote:

Originally Posted by ShevyRoots (Post 5077472)
Need help with creating a shell script

Then do show what (pseudo) code you already have and where you're stuck.

OTOH if you've never created a script then these might help:
http://www.gnu.org/software/bash/man...ode/index.html
http://www.tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html
http://www.tldp.org/LDP/Bash-Beginne...tml/index.html

ShevyRoots 12-08-2013 02:13 PM

Shell Script to parse system performance
 
Hey unSpawn, thanks for the reply. I do appreciate your links. Really, I was looking for a sample scripts to retrieve/pull and display call related stats concerning three different nodes/systems that's providing VoIp calls stats. The /stats dir create files every 15 minutes and have fields like, TotalInvites, TotalFailedCalls, Total Sip500Errorcode and so on. Anyhow, I'll dig into the information within the links you sent me.

Thanks
ShevyRoots

unSpawn 12-08-2013 03:18 PM

Before you dig into the nfo best search for common SIP / VoIP commands and related tools. Should be a tool already providing statistics...

grail 12-08-2013 09:15 PM

If the statistics are for the individual user you may wish to have a look at conky and see if it can display what you need (why re-create the wheel if someone has done it for you :) )

grail 12-08-2013 09:19 PM

If the statistics are for the individual user you may wish to have a look at conky and see if it can display what you need (why re-create the wheel if someone has done it for you :) )

schneidz 12-10-2013 09:03 AM

Quote:

Originally Posted by ShevyRoots (Post 5077524)
Hey unSpawn, thanks for the reply. I do appreciate your links. Really, I was looking for a sample scripts to retrieve/pull and display call related stats concerning three different nodes/systems that's providing VoIp calls stats. The /stats dir create files every 15 minutes and have fields like, TotalInvites, TotalFailedCalls, Total Sip500Errorcode and so on. Anyhow, I'll dig into the information within the links you sent me.

Thanks
ShevyRoots

not really sure the format of your stats file but perhaps this is a start:
Code:

egrep "(TotalInvites|TotalFailedCalls|Total Sip500Errorcode)" stats.txt

ShevyRoots 12-10-2013 09:19 AM

Hey, thanks schneidz!! I'll try that.


All times are GMT -5. The time now is 11:14 PM.