[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


Unix Discovery Script

Posted on 2006-04-27
Medium Priority
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

brettmjohnson earned 664 total points
ID: 16556409
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


Assisted Solution

bira earned 664 total points
ID: 16557562
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

ahoffmann earned 672 total points
ID: 16562783
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

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
Suggested Courses
Course of the Month19 days, 7 hours left to enroll

872 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