Register
It is currently Sat Oct 25, 2014 10:00 am

Bash Script for system info


All times are UTC - 6 hours


Post new topic Reply to topic  [ 2 posts ] 
Author Message
 PostPosted: Fri Mar 06, 2009 2:07 pm   

Joined: Fri Mar 06, 2009 2:02 pm
Posts: 1
How would I go about making a bash script that shows a list of all the users logged on, all running processes, as well as mounted filesystems? Would I have to set up 3 variables? Or are there system variables already present?


Top
 Profile  
 PostPosted: Sat Mar 07, 2009 5:50 am   

Joined: Mon Nov 17, 2008 7:25 am
Posts: 221
Well depends if you want to reformat the output.

If you just want it plain and simple.
Code:
#!/bin/bash
who
ps aux
mount


You can use "df -h" instead of mount if you want free space and such

Best regards
Fredrik Eriksson


Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP