Unix Discovery Script

Posted on 2006-04-27
Last Modified: 2013-12-06
I am looking for a relatively simple "shell script" or similar that returns system information.

Kind of stuff I'm after is - computer name, dns, IP addresses, mac addresses, system time, disk info, number of cpus, cpuspeed, memory, serial number [ideally list of software too].

I was hoping most of this could be returned into the output stream and then redirected to a file on a windows share

I have access to a wonderful and very complete tool called Magnicomp Sysinfo, which I am very happy with. But I am looking for something lighterweight and free which could be used just to return basic asset information on a unix box without actually installing anything on that box.

Any pointers or sample scripts would be great.

I am a "windows person" unfortunately so have only very limited unix knowledge

thanks in advance
Question by:plq
    LVL 23

    Accepted Solution

    Much of this is available using many of the standard utilities,
    such as 'uname', 'ifconfig', 'getconf', and 'date'.

    Unfortunately, there is no standard unix utility that coalesces
    all the information.  Each Unix variant tends to have its own.
    For instance,
    sysinfo on Solaris and Linux
    sysdef on SVR4 and several other unix variants
    system_profiler on Darwin/Mac OS X
    hinv or sysconf on Irix

    LVL 6

    Assisted Solution

    I suggest you to create a script like this:

    # yourscript
    uname -a > /tmp/result.txt
    ifconfig >>  /tmp/result.txt
    getconf >> /tmp/result.txt
    date     >> /tmp/result.txt

      this will create the file /tmp/result.txt with all the

    LVL 51

    Assisted Solution

    hmm, some information require OS-specific tools, so you need to tell us for which UNIX you want this.

    > computer name
      uname -a

    > dns
     cat /etc/resolv.conf

    > IP addresses, mac addresses
    ifconfig -a

    > system time
    date; date -u

    > disk info
    dmesg  # or whatever is available on your system

    > number of cpus, cpuspeed
    /usr/platform/`uname -m`/sbin/prtdiag
    cat /proc/cpuinfo

    > memory, serial number
    cat /proc/meminfo

    >  [ideally list of software too].
    you're joking, aren't you?

    ls /bin /usr/bin /sbin /usr/sbin /usr/local/bin /opt   # and many, many many, more

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Suggested Solutions

    Title # Comments Views Activity
    forget admin password 8 16
    unix/linux AWK  Script question 6 55
    Streamline a For loop in Ksh 3 28
    MarkLogic 1 24
    A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
    About FreeBSD Jails In FreeBSD, jails are a way of doing operating system level virtualization.  The basis of FreeBSD jails is chroot (, which changes the root directory of processes.  As a…
    Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
    This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

    758 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now