LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-08-2013, 12:34 PM   #1
ShevyRoots
LQ Newbie
 
Registered: Dec 2013
Posts: 5

Rep: Reputation: Disabled
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
 
Old 12-08-2013, 01:11 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Welcome to LQ. Hope you like it here.


Quote:
Originally Posted by ShevyRoots View Post
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
 
Old 12-08-2013, 02:13 PM   #3
ShevyRoots
LQ Newbie
 
Registered: Dec 2013
Posts: 5

Original Poster
Rep: Reputation: Disabled
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
 
Old 12-08-2013, 03:18 PM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Before you dig into the nfo best search for common SIP / VoIP commands and related tools. Should be a tool already providing statistics...
 
Old 12-08-2013, 09:15 PM   #5
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 10,005

Rep: Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191
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 )
 
Old 12-08-2013, 09:19 PM   #6
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 10,005

Rep: Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191
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 )
 
Old 12-10-2013, 09:03 AM   #7
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,313

Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
Quote:
Originally Posted by ShevyRoots View Post
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
 
Old 12-10-2013, 09:19 AM   #8
ShevyRoots
LQ Newbie
 
Registered: Dec 2013
Posts: 5

Original Poster
Rep: Reputation: Disabled
Hey, thanks schneidz!! I'll try that.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need Shell Script to parse Zimbra Sync.log rlug Linux - General 1 01-08-2012 08:29 AM
How can I configure a shell script which will parse ldap data in for each dn: vikki Linux - Server 2 12-28-2011 07:38 AM
[SOLVED] How do I make an AWK script parse a Shell Variable Nerdio Linux - Newbie 4 11-16-2011 01:16 PM
[SOLVED] How to parse and modify these keywords using shell script? corone Programming 17 04-26-2011 07:33 AM
[shell script] execute command and parse output stoiss Programming 2 01-26-2009 01:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:46 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration