Announcement

Collapse
No announcement yet.

System information script: sysinfo.sh

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    System information script: sysinfo.sh

    I have created my own quick and dirty system information script. It just calls a few simple commands to output some vital system status information. It would be great to read what you all think of it. Please do add your comments and criticisms!

    The script:
    Code:
    echo -e \\t System time:
    date
    
    echo -e \\n\\t System uptime:
    uptime
    
    echo -e \\n\\t Linux version:
    uname -a
    
    echo -e \\n\\t KDE version:
    kde-config -v
    
    echo -e \\n\\t Ubuntu version:
    lsb_release -a
    
    echo -e \\n\\t Free memory in MB:
    free -mlt
    
    echo -e \\n\\t Mounted disk volumes:
    mount | grep '^/dev/[hs][cd][a-z]' | sort
    
    echo -e \\n\\t Disk free space:
    df -hlTx tmpfs
    
    echo -e \\n\\t Active network adapters:
    ifconfig | grep 'inet addr\|encap'
    Example output:
    Code:
         System time:
    Wed Nov 25 14:45:01 EST 2009
    
         System uptime:
     14:45:01 up 5 days, 11:10, 1 user, load average: 0.18, 0.25, 0.20
    
         Linux version:
    Linux Alia 2.6.24-25-generic #1 SMP Tue Oct 20 07:31:10 UTC 2009 i686 GNU/Linux
    
         KDE version:
    Qt: 3.3.8b
    KDE: 3.5.10
    kde-config: 1.0
    
         Ubuntu version:
    No LSB modules are available.
    Distributor ID: Ubuntu
    Description:  Ubuntu 8.04.3 LTS
    Release:    8.04
    Codename:    hardy
    
         Free memory in MB:
           total    used    free   shared  buffers   cached
    Mem:     1009    982     27     0     8    499
    Low:      883    855     27
    High:     126    126     0
    -/+ buffers/cache:    474    534
    Swap:     1906     40    1866
    Total:    2915    1022    1893
    
         Mounted disk volumes:
    /dev/sda3 on / type ext3 (rw,relatime,errors=remount-ro)
    
         Disk free space:
    Filesystem  Type  Size Used Avail Use% Mounted on
    /dev/sda3   ext3  364G 149G 197G 44% /
    
         Active network adapters:
    eth0   Link encap:Ethernet HWaddr 00:16:76:52:1b:fb
         inet addr:192.168.11.2 Bcast:192.168.11.255 Mask:255.255.255.0
    lo    Link encap:Local Loopback
         inet addr:127.0.0.1 Mask:255.0.0.0
    Welcome newbies!
    Verify the ISO
    Kubuntu's documentation

    #2
    Re: System information script: sysinfo.sh

    You can get a lot of information using the fairly short command:
    sudo lshw -html > your-file-name.html
    It writes an html file which you can then view with Firefox.

    See "Find Hardware Specs (Details) on your Computer" on http://embraceubuntu.com/2007/02/18/...your-computer/
    "A problem well stated is a problem half solved." --Charles F. Kettering
    "Sometimes the questions are complicated and the answers are simple."--Dr. Seuss

    Comment


      #3
      Re: System information script: sysinfo.sh

      This made me remember of a past desire of building a custom kernel only with the drivers being used for my laptop.

      How could we use the lshw driver information to build a script to select only the used drivers/modules in the .config file of the Kernel (I want to discard everything else).

      Regards.

      Comment


        #4
        Re: System information script: sysinfo.sh

        Originally posted by luispt
        How could we use the lshw driver information to build a script to select only the used drivers/modules in the .config file of the Kernel (I want to discard everything else).
        I don't know, but you may start your research with the KernelCompile article in Community Ubuntu Documentation.
        Welcome newbies!
        Verify the ISO
        Kubuntu's documentation

        Comment

        Working...
        X