LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 06-10-2013, 11:05 AM   #1
adumith
Member
 
Registered: Feb 2013
Posts: 44

Rep: Reputation: Disabled
Wink Monitoring services.


As administrator of the platform, one of my daily tasks is to see how much the system is running as servers.

To verify servers use fields as TOP, DF or PS.

I would like to do this a little easier, I mean, throught an SCRIPT I generate a report to display with the info that I need.

Does anyone have something similar that can share?

Thank you so much.
 
Old 06-10-2013, 12:21 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
sounds like you want a bog standard server monitoring solution. go take your pick. Nagios is popular, as is groundworks, zenoss, hyperic, OpManager and dozens of others.
 
Old 06-10-2013, 12:25 PM   #3
Habitual
LQ Addict
 
Registered: Jan 2011
Posts: 7,802
Blog Entries: 11

Rep: Reputation: 2104Reputation: 2104Reputation: 2104Reputation: 2104Reputation: 2104Reputation: 2104Reputation: 2104Reputation: 2104Reputation: 2104Reputation: 2104Reputation: 2104
As many answers as there are admins.

Code:
ssh -i /path/to/key root@host (top, df, ps)
is the fastest way, or
Code:
snmpwalk -v 2c -c password IP OID
on targets can be scripted.
snmp being installed most everywhere these days, it requires little configuration.

Reports based on output, I'll leave to you or another reply.

Here's some references on snmp:
http://www.net-snmp.org/tutorial/tut...mon/snmpd.html
http://www.net-snmp.org/docs/FAQ.htm..._in_snmp_conf_
http://www.nwsmith.net/HintsTips/net-snmp-tutorial.htm
http://www.net-snmp.org/docs/man/snmpd.conf.html

Good luck!
 
Old 06-10-2013, 03:32 PM   #4
adumith
Member
 
Registered: Feb 2013
Posts: 44

Original Poster
Rep: Reputation: Disabled
Wink

Thanks a lot for everyone for your reply.

So, I didnīt explain myself as well as I should have.

In my server I can not install additional applications, due to contractual clauses.

I only I have access to them through ssh, so it is that I need a SCRIPT that allows me to collect this information and display it on the screen to take the data and record in my logbook.

Another idea?

Thanks again.
 
Old 06-10-2013, 04:01 PM   #5
Habitual
LQ Addict
 
Registered: Jan 2011
Posts: 7,802
Blog Entries: 11

Rep: Reputation: 2104Reputation: 2104Reputation: 2104Reputation: 2104Reputation: 2104Reputation: 2104Reputation: 2104Reputation: 2104Reputation: 2104Reputation: 2104Reputation: 2104
Code:
ssh user@host cmd > outputfile.ext
where cmd is one of top, df, or ps and outputfile.ext is a redirect to your local machine.
 
Old 06-10-2013, 05:08 PM   #6
adumith
Member
 
Registered: Feb 2013
Posts: 44

Original Poster
Rep: Reputation: Disabled
Wink

Hello Habitual;

Thanks a lot for your reply; so thats exactly that I donīt wish to do.

I have this command:
ps -e -o pcpu,cpu,nice,state,cputime,args --sort pcpu | sed '/^ 0.0 /d'

Where, I remove all the process that used 0,0 at CPU; but I want to include at this command that only show me the command HTTPD.

And this another command:
ps -e -orss=,args= | sort -b -k1,1n | pr -TW$COLUMNS

Could you help me; please.

Thank in advance.
 
Old 06-10-2013, 06:05 PM   #7
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,294

Rep: Reputation: 2358Reputation: 2358Reputation: 2358Reputation: 2358Reputation: 2358Reputation: 2358Reputation: 2358Reputation: 2358Reputation: 2358Reputation: 2358Reputation: 2358
You can certainly write your own scripts as above, but note that for many monitoring services eg Nagios, they primarily use the snmp protocol, which means you don't have to install anything on the target, just need a machine to run the cmds eg a spare server or even your wkstn, potentially.
As for ps & httpd, that'd be like
Code:
 ps -e -o pcpu,cpu,nice,state,cputime,args --sort pcpu |grep httpd | sed '/^ 0.0 /d'
You'll have to explain the 2nd cmd; give context.
Also, please use code tags to post cmds & output https://www.linuxquestions.org/quest...do=bbcode#code
 
Old 06-10-2013, 08:02 PM   #8
Habitual
LQ Addict
 
Registered: Jan 2011
Posts: 7,802
Blog Entries: 11

Rep: Reputation: 2104Reputation: 2104Reputation: 2104Reputation: 2104Reputation: 2104Reputation: 2104Reputation: 2104Reputation: 2104Reputation: 2104Reputation: 2104Reputation: 2104
Quote:
Originally Posted by adumith View Post
Hello Habitual;

Thanks a lot for your reply; so thats exactly that I donīt wish to do.
Well, I never!

Whatever Chris says...

That's my "Final Answer"
 
  


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
[SOLVED] Nagios: monitoring xenapp services TalkingMarble Linux - Software 4 04-03-2012 01:28 PM
monit keeps stopping monitoring my services steve51184 Linux - Software 9 09-02-2009 10:54 AM
LXer: Monitoring Ubuntu Services Using Monit LXer Syndicated Linux News 0 07-31-2007 10:31 PM
Monitoring a cluster thru web services nedian123 Linux - Networking 1 12-22-2004 02:40 PM
Monitoring Services SkYzOpReNiCk Linux - Networking 2 11-17-2001 04:48 PM


All times are GMT -5. The time now is 08:03 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration