Solaris

From neil.tappsville.com
Revision as of 08:32, 12 August 2019 by Gonzo (talk | contribs) (Created page with "===Solaris 9=== Extended ps output > 80 cols <pre> /usr/ucb/ps -alxwww sudo pargs [process]</pre> Get % of system the process is using <pre> /usr/ucb/ps -xwwwv 27595 PID...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Solaris 9

Extended ps output > 80 cols

/usr/ucb/ps -alxwww

sudo pargs [process]

Get % of system the process is using

/usr/ucb/ps -xwwwv 27595
   PID TT       S  TIME SIZE  RSS %CPU %MEM COMMAND
 27595 ?        S  1:52 9792 8896  0.0  0.1 /usr/local/ActivePerl-5.8/bin/perl -w script.pl config.conf log.log


Solaris NTP Time Sync


Solaris server stats


Check host used for Mail Relay

grep DS /etc/mail/submit.cf

Install a package

pkgadd -d /path/package.pkg

Extract a packages contents without installing

pkgtrans /path/package.pkg /dir_to_install

Solaris Cluster - force a failover

/usr/cluster/bin/clrg "switch" -n "HOST_DEST" "CLUSTER_GROUP"

Check for EDS backups (needs root)

dsmc q ba [dir]


Useful disk usage commands

iostat 2 5
ps -ef -o pcpu,vsz,fname,pmem
prstat


Change the timezone of the server

- Shutdown all Application processes
- Shutdown Oracle
- as root
a) Edit /etc/TIMEZONE

NOTE: the man page incorrectly states this file is called /etc/timezone

TZ=NZ or TZ=Singapore
For the full list, look in 
/usr/share/lib/zoneinfo/
b) Reboot your server with shutdown or init. (First make sure Oracle is not setup to startup automatically)


Check used inodes

 df -F ufs -o i
Filesystem             iused   ifree  %iused  Mounted on
/dev/md/dsk/d17        90930  551118    14%   /
/dev/md/dsk/d18       180081 1098383    14%   /var
/dev/md/dsk/d9          2362  342086     1%   /export/home


Network bits

Routes - remember to add them to /etc/staticroutes and /etc/netmasks (this changes in solaris 9 and 10.

route add net [network] -netmask 255.255.255.0 -o [gateway]

Add a blackhole

route add [dest] 127.0.0.1 -blackhole

route add [host] -netmask 255.255.255.255 1.1.1.11


Show routes

netstat -nrv

Enable a network Card / Interface

ifconfig [ifname] plumb

ifconfig [ifname] [ipaddress]

netmask 255.255.255.0 up

Check what is using a port

lsof -i  | grep [port #]
netstat

hard and Soft Links - find the limits

ulimit -Hn
ulimit -Sn