Operating System - Linux
1745790 Members
4220 Online
108722 Solutions
New Discussion юеВ

Script for collection system information

 
SOLVED
Go to solution
Venkat_33
Frequent Advisor

Script for collection system information

Hi,

I need script for getting system informaiotn like

1.Uptime
2.Last fail date and time:

and also i am implementing cacti for monitor i want to monitor all the unix server without using SNMP so please if you have any idea or script get datas thr' ssh please share to me
7 REPLIES 7
Steve Steel
Honored Contributor
Solution

Re: Script for collection system information

Hi

Interesting idea but why not.

http://www.shelldorado.com/

Is the place to look for scripts

Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Arunvijai_4
Honored Contributor

Re: Script for collection system information

Hello,

You can use commands like,

# /opt/ignite/bin/print_manifest
and tools like http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/sysinfo-3.3.1/

Also, Do a search with ITRC, you will get lot of threads, like this one.

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=22937

-Arun


"A ship in the harbor is safe, but that is not what ships are built for"
Zeev Schultz
Honored Contributor

Re: Script for collection system information

As to last fail date and time it could be tricky since there are different kinds of failures in HPUX. Like,for example,one may see "panic" string in /etc/shutdownlog on certain event but may not see it as well since its not allways get there :)

To be simplistic - forget about last fail date and time, go for uptime. Anyway,clean reboots,halts and hang/panic events would be often seen in /etc/shutdownlog.

Now,what do you mean by "monitor the unix server"? What kind of monitoring?

Hardware events can be monitored by some methods,like Online Diagnostics for example (EMS) which capable to send e-mails on critical events.Or Webes tool.

Software events...well sky is the limit here.

So prepare a list of what you'd like to monitor first.
So computers don't think yet. At least not chess computers. - Seymour Cray
James R. Ferguson
Acclaimed Contributor

Re: Script for collection system information

Hi Venkat:

Why not query?

1. uptime
2. who -b
3. /etc/shutdownlog

The three give you the basic information of ups-and-downs.

Regards!

...JRF...
Venkat_33
Frequent Advisor

Re: Script for collection system information

i want to get uptime and last reboot value from local server to remote server and remote server i have solaris ,aix and hpux

please help me
Arunvijai_4
Honored Contributor

Re: Script for collection system information

Hi,

You can use "remsh" to get these values. Just you use the commands given JRF.

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Venkat_33
Frequent Advisor

Re: Script for collection system information

i am getting value thro ssh i setted ssh keys all unix servers.

But i want to do run the php file i,e

$system = x.x.x.x;
$data = shell_exec("ssh root@$system uptime");
print "Uptime: $data
\n";
?>

But its error is showing please help me how to define ssh on PHP file