Originally posted by: jamesave
what is the command to list out the hardware on a SUN server? trying to figure out how much memory, what is the processors, etc.
prtdiag is the most common to use for this. it'll work in just about any version of Solaris, not sure if it was in SunOS, been a long time since I touched 4.silly.
You can also get stuff from prtconf and cfgadm, depending on your version.
some quick stuff that is handy:
find
find . -name "foo*" -print
will do a recursive search starting at . and list anything that starts with foo. you can do lots of other things besides -print, too, like -exec, etc.
a very quick find on solaris, assuming you're looking for a file that was added as part of the OS, a patch, or a pkg is just:
grep "filename" /var/sadm/install/contents Anyways, that file lists EVERY file, directory, link, pipe, etc., installed by the OS, patches, and/or pkgs.
I use awk a lot too, but nothing too complex. stuff like
cat /etc/hosts | awk ' { print $2 } '
which will print out the first hostname listed on each line. I usually use it more for devices, especially when working with veritas diskgroups/volumes/dgs/disks and regular old luns.
luxadm probe will list most of your fiber-attached devices, assuming they're not LUN-masked, or zoned. Lots of junk to do with luxadm, especially if you do fiber-attached array work direct or SAN-attached.
hmm, what else do I use all the time? silly stuff like
pwd
who
w
last
pkill sendmail (hehehehehe)