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. |
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.
|
As many answers as there are admins. ;)
Code:
ssh -i /path/to/key root@host (top, df, ps) Code:
snmpwalk -v 2c -c password IP OID 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! |
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. |
Code:
ssh user@host cmd > outputfile.ext |
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. |
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' Also, please use code tags to post cmds & output https://www.linuxquestions.org/quest...do=bbcode#code |
Quote:
Whatever Chris says... That's my "Final Answer" |
All times are GMT -5. The time now is 12:34 AM. |