[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Script to build system information. Guru needed :)



On 2004-12-21 @ 18:30:35 (week 52) Bob Alexander wrote:

> Slowly building my "disaster assurance" strategy on top of the file backups.
> 
> Amongst other things I want to periodically run a shell script that 
> would build a file with useful information. Here it is:
> 
> lsmod
> lspci
> dpkg --get-selections
> sudo fdisk -l /dev/hda
> df
> uname -a
> 
> Now the questions:
> 
> 1) Other useful commands I am not thinking about ?
> 2) I would like to redirect the output to a file called with the 
> catenation of 'uname -n'.'uname -r'.config.YYYYMMDDHHMM.txt where 
> YYYYMMDDHHMM is a timestamp of the command execution time. How do I 
> obtain such value ? How do I create the required backticks on my laptop 
> keyboard (no separate numpad)
> 3) If I use cron to run this everyday, being this a laptop client, will 
> the due command be executed if it's natural time has expired ?
> 4) What is the easiest way to keep the last N versions of such files ?

Search Google for a script called system-info by Karsten M. Self. He
posted it a long time ago, but it still is very useful. Start from there
and add the things you want to have that are not already done by it.

Grx hdV



Reply to: