Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

I need more commands to tell me all about a solaris box

Posted on 2010-08-31
5
Medium Priority
?
395 Views
Last Modified: 2012-06-27
We are in a closed network and can not install software.  We can however run bash scripts to get system information to keep in case we have to rebuild, replace or move systems.

I have a script with commands for solaris.  Can anybody suggest some commands I have forgotten ?


output=output.txt

#########
#       The purpose of this function it to recive a shell command string (SS)
#       Echo a begin marker with hostname and (SS)
#       Echo the results of (SS)
#       Echo a end marker just like the start marker
#       except the begin marker has "b" and the end has "e"
#
#########



# clear out old output.txt
echo > ${output}

function doo(){

echo "tqf####~"$hostname"~${1}~b~####" >> ${output}
echo  >> ${output}

${1}  >> ${output}

echo  >> ${output}
echo "tqf####~"$hostname"~${1}~e~####" >> ${output}
echo  >> ${output}

}

## note all commands commented out were try and did not work on REDHAT 5.5.  
## most of the commented out commands are likely for redhat or software I do not have on my solaris system
## I do not have access to a solaris server with zones and want to have solaris admin write that part of the code 
## to get ip addresses for virtual zones from the host solaris 10 OS






doo "/bin/df"
doo "/bin/netstat"
doo "/bin/ps"
doo "/bin/uname"
doo "/usr/bin/ipcs"
doo "/usr/bin/uptime"
doo "cat /etc/hosts"
doo "cat /etc/nsswitch.conf"
doo "cat /etc/passwd"
doo "cat /etc/resolv.conf"
doo "cat /etc/services"
doo "crontab -l"
doo "df -k"
doo "domainname"
doo "hostname"
doo "ls -d"
doo "ls -l"
doo "mount"
doo "netstat -a"
doo "netstat -an"
doo "netstat -ng"
doo "pkginfo -i"
doo "pkginfo -l"
doo "ps -ef"
doo "uname -a"
doo "uname -r"
doo "uname"
doo "vmstat"

Open in new window

0
Comment
Question by:TIMFOX123
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 16

Assisted Solution

by:santoshmotwani
santoshmotwani earned 600 total points
ID: 33572918
0
 
LVL 38

Expert Comment

by:yuzh
ID: 33572930
Why not simply donload the Sun Explorer, installed it and save the output to somewhere
http://docs.sun.com/app/docs/coll/1554.2
 
0
 
LVL 4

Accepted Solution

by:
atech1 earned 700 total points
ID: 33573583
some others:

showrev -p  .................OS patch level
swap -l ........................list swap space
/usr/bin/pagesize
crontab -l .....................user crontab
prtconf .........................hardware config
prtvtoc /dev/rdsk/.... ....hardware toc
ifconfig -a .....................network devs
 /etc/vfstab
 /etc/aliases
 /etc/sudoers
 /etc/inittab

any ssh keys anywhere? $HOME/user/.ssh

etc...

----

0
 
LVL 1

Assisted Solution

by:Darthpatjuh
Darthpatjuh earned 700 total points
ID: 33575516
you  can use prtdiag for hardware health status
metastat for software raid status
raidctl for hardware raid status
zoneadm list for zone information
iostat for io subsystem information
zpool list for zpool,s usage
zpool status -v for the status and health of your zpool
0
 

Author Comment

by:TIMFOX123
ID: 33577674
updated script from above suggestoins.  

raidctl and zpool were not on my system.
output=output.txt

#########
#       The purpose of this function it to recive a shell command string (SS)
#       Echo a begin marker with hostname and (SS)
#       Echo the results of (SS)
#       Echo a end marker just like the start marker
#       except the begin marker has "b" and the end has "e"
#
#########



# clear out old output.txt
echo > ${output}

function doo(){

echo "tqf####~"$hostname"~${1}~b~####" >> ${output}
echo  >> ${output}

${1}  >> ${output}

echo  >> ${output}
echo "tqf####~"$hostname"~${1}~e~####" >> ${output}
echo  >> ${output}

}

## note all commands commented out were try and did not work on REDHAT 5.5.  
## most of the commented out commands are likely for redhat or software I do not have on my solaris system
## I do not have access to a solaris server with zones and want to have solaris admin write that part of the code 
## to get ip addresses for virtual zones from the host solaris 10 OS






doo "/bin/df"
doo "/bin/netstat"
doo "/bin/ps"
doo "/bin/uname"
doo "/usr/bin/ipcs"
doo "/usr/bin/uptime"
doo "cat /etc/hosts"
doo "cat /etc/nsswitch.conf"
doo "cat /etc/passwd"
doo "cat /etc/resolv.conf"
doo "cat /etc/services"
doo "crontab -l"
doo "df -k"
doo "domainname"
doo "hostname"
doo "ls -d"
doo "ls -l"
doo "mount"
doo "netstat -a"
doo "netstat -an"
doo "netstat -ng"
doo "pkginfo -i"
doo "pkginfo -l"
doo "ps -ef"
doo "uname -a"
doo "uname -r"
doo "uname"
doo "vmstat"
doo "showrev -p"
doo "swap -l" 
doo "crontab -l"
doo "prtvtoc /dev/rdsk/" 
doo "ifconfig -a"
doo "cat /etc/vfstab"
doo "cat /etc/aliases"
doo "cat /etc/sudoers"
doo "cat /etc/inittab"
#doo "prtdiag" 
#doo "raidctl" 
doo "iostat"
#doo "zpool status -v"

Open in new window

0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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.:
Suggested Courses

618 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