Solaris/Linux notes

# cat /proc/sys/fs/aio-nr;cat /proc/sys/fs/aio-max-nr 110456 1048576

To get all the wwns attached to an hba you can use this # cfgadm -al -o show_FCP_dev | egrep ‘disk|tape’

i don’t like to do a # cat /etc/passwd and manually create the users and chown their dirs… So, this is a one liner: # grep -i home /etc/passwd | awk -F: ‘{print “mkdir ” $6 ” ; chown ” $1 ” ” $6 }’ > somefile; chmod 755 somefile;./somefile 183/433

Categories: Uncategorized | 1 Comment

Just do this: ls /sys/class/scsi_host/ | while read h;do echo “- – -” > /sys/class/scsi_host/$h/scan;done

Got these from elsewhere: Term/Cmd Description Command / File =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- SUNWosafw Open Storage Array Firmware SUNWosamn Open Storage Array Man Pages SUNWosar Open Storage Array (Root) SUNWosau Open Storage Array (Usr) arraymon Array monitor daemon < /usr/lib/osa/bin/rdaemon 28 140 > in background rdaemon Redundant Controller Resolution Daemon < /usr/lib/osa/bin/arraymon > in background rm6 Raid Manager [...]

Edit /etc/TIMEZONE and use one of the typical: US/Eastern US/Central US/Mountain US/Pacific or look for an appropriate timezone in /usr/share/lib/zoneinfo After this reboot your server with shutdown or init. 237/433

bash-2.03# fuser -c / 2>&1| tr -d ‘[:alpha:]‘ | sed ‘s//://g’ 21567 21566 21523 21507 21476 21397 20978 20711 20608 20598 19955 19921 19912 19873 19872 19871 19870 19869 19868 19867 19860 19859 19750 19743 19512 19187 19186 19185 19184 19183 18779 18357 18346 18048 17566 17224 17220 17218 17198 17035 17033 17031 17029 17014 [...]

Just type # isainfo -v

for those who feel comfortable with the hagui in Veritas Cluster, and cannot use it because you don’t have the daemon running, you must add this section to your /etc/VRTSvcs/conf/config/main.cf: group ClusterService ( SystemList = { hst101 = 0, hst102 = 1 } AutoStartList = { hst101, hst102 } OnlineRetryLimit = 3 Tag = CSG [...]

you can do this (date “+%d %m %H %M %S %Y” /usr/local/bin/top -b | head -4) >> /tmp/top.txt Then parse and collect: echo “date,time,loadavg1,loadavg5,loadavg10,processes,sleeping processes,on cpu,cpu idle,cpu user,cpu kernel,cpu iowait,swap,memory,free mem,total swap,free swap” cat /tmp/top.txt |nawk ‘ORS=NR%5?” “:”n”‘ | tr -d ‘[:alpha:]‘| sed ‘s/;//g;s/:/ /g;s/,//g’ | awk ‘{ print $1″/”$2″/”$6″,”$3″:”$4″:”$5″,”$8″,”$9″,”$10″,”$17″,”$18″,”$19″,”$20″,”$21″,”$22″,”$23″,”$24″,”$25″,”$26″,”$27″,”$28 }’ this builds a csv [...]