-   Programming (
-   -   lastlog (

November11 01-08-2007 09:43 PM

I need to write a program that can monitor our server,

Who is logged into the machine?
What are they doing?
Where are they logged in from?
What active TCP/UDP connections are there?
Where are these connections being made to/from?

and output the details to a text file.

Hoping someone out there have a similar script that I can get an idea from.

Thanks in advance

raskin 01-09-2007 01:40 AM


w >> log
ps aux >> log
netstat -nlp >> log

chrism01 01-10-2007 06:47 PM

If you want the sort of sophisticated (eg x-ref output) I think you are asking for, Perl is designed to do this kind of stuff.
You prob also want to consider storing the results in MySQL for later analysis.

All times are GMT -5. The time now is 08:47 PM.