• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 674
  • Last Modified:

Unix Discovery Script

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
0
plq
Asked:
plq
3 Solutions
 
brettmjohnsonCommented:
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

0
 
biraCommented:
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
  information.



0
 
ahoffmannCommented:
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
dmesg
/usr/platform/`uname -m`/sbin/prtdiag
cat /proc/cpuinfo

> memory, serial number
dmesg
cat /proc/meminfo
top

>  [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
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now