Cause
This message comes from the NFS status monitor daemon statd(1M), which provides crash recovery services for the NFS lock daemon lockd(1M). The message indicates that statd(1M) has left old references in the /var/statmon/sm and /var/statmon/sm.bak directories. After a user has removed or modified a host in the hosts database, statd(1M) might not properly purge files in these directories, which results in its trying to communicate with a nonexistent host.
Action Plan
Remove the file named variable (where variable is the host name) from both the /var/statmon/sm and /var/statmon/sm.bak directories. Then kill the statd(1M) daemon and restart it. If that does not get rid of the message, kill and restart lockd(1M) as well. If that remedy does not work, reboot the machine at your convenience.
ps -eaf | fgrep statd
svcs -a | grep "nfs/status"
svcadm -v disable nfs/status
delete svr
svcadm -v enable nfs/status
OVERVIEW "Senior Solaris System Administrator", with a wide range of Unix platform. A background of 24x7 mission-critical environments, full change control process, systems monitoring, and performance analysis. A knack for cleaning up impossible messes, and making things Work Right. A history of mentoring junior admins to reach senior level.
Sunday, June 23, 2013
Wednesday, July 27, 2011
Configuration to HTML (cfg2html)
This is not a new tool, but I still want to explain a little bit about this, it is a powerful and a very useful tool. It will make system administrator’s life a lot easier and well organize. For those who never test this, I suggest you should try it. The information is complete and all inside one page. For the HP server they have their own tool called “Nickel”. But I found cfg2html is a lot faster and complete than “nickel”. What u needs to do is just copy the script to your server and run it. After few times then u can harvest the output. With here I attached what is the script can do.
Contents
System Hardware and Operating System Summary
Hardware and OS Information
showrev
Hardware Configuration (prtdiag)
Disk Device Listing
Disks
Solaris Volume Manager (SVM)
SVM Version
Status of SVM Meta Database
SVM Metadevice status
SVM Configuration (concise format)
SVM Configuration (md.tab format)
Local File Systems and Swap
Versions of /etc/vfstab
Contents of vfstab
Currently Mounted File Systems
Disk Utilization (GB)
Swap Device Listing
ZFS Configuration
ZFS Version
zpool list
zpool status
zfs list
zfs get all (defaults omitted)
NFS Configuration
Contents of dfstab
Remote file systems mounted via NFS
Local file systems shared via NFS
Local file systems mounted on remote hosts via NFS
Zone/Container Information
Zone Listing
Configuration for Zone global
Network Settings
ifconfig -a output
dladm show-dev output
Open Ports
Routing Table
nsswitch.conf
resolv.conf
Hosts file
Netmasks
NTP daemon configuraition
EEPROM
EEPROM Settings
Versions of /etc/system
Contents of /etc/system
Cron
crontabs
cron.allow
cron.deny
System Log
syslog.conf
Password and Group files
/etc/passwd
/etc/group
Software
Packages Installed
Patches Installed
Resource Limits
sysdef
ulimit -a
Projects Listing (projects -l)
Contents of /etc/project
Services
Service Listing (svcs -a)
inittab
Start-Up Script Listing
/etc/rc1.d/S10lu
/etc/rc2.d/S10lu
/etc/rc2.d/S20sysetup
/etc/rc2.d/S40llc2
/etc/rc2.d/S42ncakmod
/etc/rc2.d/S47pppd
/etc/rc2.d/S70sckm
/etc/rc2.d/S70uucp
/etc/rc2.d/S72autoinstall
/etc/rc2.d/S73cachefs.daemon
/etc/rc2.d/S76ACT_dumpscript
/etc/rc2.d/S81dodatadm.udaplt
/etc/rc2.d/S89PRESERVE
/etc/rc2.d/S90loc.ja.cssd
/etc/rc2.d/S90wbem
/etc/rc2.d/S90webconsole
/etc/rc2.d/S91afbinit
/etc/rc2.d/S91gfbinit
/etc/rc2.d/S91ifbinit
/etc/rc2.d/S91jfbinit
/etc/rc2.d/S91zuluinit
/etc/rc2.d/S94Wnn6
/etc/rc2.d/S94atsv
/etc/rc2.d/S94ncalogd
/etc/rc2.d/S95IIim
/etc/rc2.d/S98deallocate
/etc/rc2.d/S99audit
/etc/rc2.d/S99dtlogin
/etc/rc2.d/S99sneep
/etc/rc3.d/S16boot.server
/etc/rc3.d/S50apache
/etc/rc3.d/S52imq
/etc/rc3.d/S75seaport
/etc/rc3.d/S76snmpdx
/etc/rc3.d/S77dmi
/etc/rc3.d/S80mipagent
/etc/rc3.d/S81volmgt
/etc/rc3.d/S82initsma
/etc/rc3.d/S84appserv
/etc/rc3.d/S90samba
/etc/rc3.d/S92route
/etc/rcS.d/S29wrsmcfg
/etc/rcS.d/S51installupdates
Oracle
Oracle Database Instances Running
Oracle Version
Contents
System Hardware and Operating System Summary
Hardware and OS Information
showrev
Hardware Configuration (prtdiag)
Disk Device Listing
Disks
Solaris Volume Manager (SVM)
SVM Version
Status of SVM Meta Database
SVM Metadevice status
SVM Configuration (concise format)
SVM Configuration (md.tab format)
Local File Systems and Swap
Versions of /etc/vfstab
Contents of vfstab
Currently Mounted File Systems
Disk Utilization (GB)
Swap Device Listing
ZFS Configuration
ZFS Version
zpool list
zpool status
zfs list
zfs get all (defaults omitted)
NFS Configuration
Contents of dfstab
Remote file systems mounted via NFS
Local file systems shared via NFS
Local file systems mounted on remote hosts via NFS
Zone/Container Information
Zone Listing
Configuration for Zone global
Network Settings
ifconfig -a output
dladm show-dev output
Open Ports
Routing Table
nsswitch.conf
resolv.conf
Hosts file
Netmasks
NTP daemon configuraition
EEPROM
EEPROM Settings
Versions of /etc/system
Contents of /etc/system
Cron
crontabs
cron.allow
cron.deny
System Log
syslog.conf
Password and Group files
/etc/passwd
/etc/group
Software
Packages Installed
Patches Installed
Resource Limits
sysdef
ulimit -a
Projects Listing (projects -l)
Contents of /etc/project
Services
Service Listing (svcs -a)
inittab
Start-Up Script Listing
/etc/rc1.d/S10lu
/etc/rc2.d/S10lu
/etc/rc2.d/S20sysetup
/etc/rc2.d/S40llc2
/etc/rc2.d/S42ncakmod
/etc/rc2.d/S47pppd
/etc/rc2.d/S70sckm
/etc/rc2.d/S70uucp
/etc/rc2.d/S72autoinstall
/etc/rc2.d/S73cachefs.daemon
/etc/rc2.d/S76ACT_dumpscript
/etc/rc2.d/S81dodatadm.udaplt
/etc/rc2.d/S89PRESERVE
/etc/rc2.d/S90loc.ja.cssd
/etc/rc2.d/S90wbem
/etc/rc2.d/S90webconsole
/etc/rc2.d/S91afbinit
/etc/rc2.d/S91gfbinit
/etc/rc2.d/S91ifbinit
/etc/rc2.d/S91jfbinit
/etc/rc2.d/S91zuluinit
/etc/rc2.d/S94Wnn6
/etc/rc2.d/S94atsv
/etc/rc2.d/S94ncalogd
/etc/rc2.d/S95IIim
/etc/rc2.d/S98deallocate
/etc/rc2.d/S99audit
/etc/rc2.d/S99dtlogin
/etc/rc2.d/S99sneep
/etc/rc3.d/S16boot.server
/etc/rc3.d/S50apache
/etc/rc3.d/S52imq
/etc/rc3.d/S75seaport
/etc/rc3.d/S76snmpdx
/etc/rc3.d/S77dmi
/etc/rc3.d/S80mipagent
/etc/rc3.d/S81volmgt
/etc/rc3.d/S82initsma
/etc/rc3.d/S84appserv
/etc/rc3.d/S90samba
/etc/rc3.d/S92route
/etc/rcS.d/S29wrsmcfg
/etc/rcS.d/S51installupdates
Oracle
Oracle Database Instances Running
Oracle Version
Wednesday, July 6, 2011
Growing a soft partition and resizing filesystem in Solaris Volume Manager
I need to increase the filesystem called /bkp
root@solaris:~ # df -h /bkp
Filesystem size used avail capacity Mounted on
/dev/md/dsk/d51 44G 26G 18G 60% /bkp
It’s mounted on a soft partition
root@solaris:~ # metastat d51
d51: Soft Partition
Device: d5
State: Okay
Size: 93298688 blocks (44 GB)
Extent Start Block Block count
0 20981760 10485760
1 54536288 82812928
d5: Concat/Stripe
Size: 143349312 blocks (68 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c1t2d0s2 0 No Okay Yes
Device Relocation Information:
Device Reloc Device ID
c1t2d0 Yes id1,sd@SSEAGATE_ST373307LSUN72G_3HZ9R8BN00007523GZY7
Here I attach a LUN to metadevice d5
root@solaris:~ # metattach d5 /dev/rdsk/emcpower33c
d5: component is attached
Now d5 have an internal disk and a LUN from storage
root@solaris:~ # metastat -p d5
d5 2 1 c1t2d0s2 \
1 /dev/dsk/emcpower33c
Here is the command to increase the soft partition
root@solaris:~ # metattach d51 10g
d51: Soft Partition has been grown
After you increase the soft partition, you need to increase the filesystem with growfs
root@solaris:~ # growfs -M /bkp /dev/md/rdsk/d51
/dev/md/rdsk/d51: Unable to find Media type. Proceeding with system determined parameters.
Warning: 5376 sector(s) in last cylinder unallocated
/dev/md/rdsk/d51: 116367360 sectors in 11436 cylinders of 24 tracks, 424 sectors
56820,0MB in 1144 cyl groups (10 c/g, 49,69MB/g, 6016 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
32, 102224, 204416, 306608, 408800, 510992, 613184, 715376, 817568, 919760,
Initializing cylinder groups:
………………….
super-block backups for last 10 cylinder groups at:
115401920, 115504112, 115606304, 115708496, 115810688, 115912880, 116015072,
116117264, 116219456, 116321648
root@solaris:~ # df -h /bkp
Filesystem size used avail capacity Mounted on
/dev/md/dsk/d51 55G 26G 28G 48% /bkp
root@solaris:~ # df -h /bkp
Filesystem size used avail capacity Mounted on
/dev/md/dsk/d51 44G 26G 18G 60% /bkp
It’s mounted on a soft partition
root@solaris:~ # metastat d51
d51: Soft Partition
Device: d5
State: Okay
Size: 93298688 blocks (44 GB)
Extent Start Block Block count
0 20981760 10485760
1 54536288 82812928
d5: Concat/Stripe
Size: 143349312 blocks (68 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c1t2d0s2 0 No Okay Yes
Device Relocation Information:
Device Reloc Device ID
c1t2d0 Yes id1,sd@SSEAGATE_ST373307LSUN72G_3HZ9R8BN00007523GZY7
Here I attach a LUN to metadevice d5
root@solaris:~ # metattach d5 /dev/rdsk/emcpower33c
d5: component is attached
Now d5 have an internal disk and a LUN from storage
root@solaris:~ # metastat -p d5
d5 2 1 c1t2d0s2 \
1 /dev/dsk/emcpower33c
Here is the command to increase the soft partition
root@solaris:~ # metattach d51 10g
d51: Soft Partition has been grown
After you increase the soft partition, you need to increase the filesystem with growfs
root@solaris:~ # growfs -M /bkp /dev/md/rdsk/d51
/dev/md/rdsk/d51: Unable to find Media type. Proceeding with system determined parameters.
Warning: 5376 sector(s) in last cylinder unallocated
/dev/md/rdsk/d51: 116367360 sectors in 11436 cylinders of 24 tracks, 424 sectors
56820,0MB in 1144 cyl groups (10 c/g, 49,69MB/g, 6016 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
32, 102224, 204416, 306608, 408800, 510992, 613184, 715376, 817568, 919760,
Initializing cylinder groups:
………………….
super-block backups for last 10 cylinder groups at:
115401920, 115504112, 115606304, 115708496, 115810688, 115912880, 116015072,
116117264, 116219456, 116321648
root@solaris:~ # df -h /bkp
Filesystem size used avail capacity Mounted on
/dev/md/dsk/d51 55G 26G 28G 48% /bkp
Growing Sun Cluster File System with new Disks.
Growing Sun Cluster File System with new Disks.
Setup Details:
Number of Nodes: 2
Node Name: Node1 and Node2
Cluster: Sun Cluster 3.2
OS: Solaris 9/10
I want to add 300G (100x3) SAN LUNs with one of the cluster mount point (/apps/data).
root@Node2 # df -h|grep d300
/dev/md/apps-ms/dsk/d300 295G 258G 35G 89% /apps/data
1. Add disks to both systems (shared) in SAN
2. Configure all the fiber channels on both nodes with below steps.
root@Node1 # cfgadm -al|grep fc
c4 fc-fabric connected configured unknown
c5 fc connected unconfigured unknown
c6 fc-fabric connected configured unknown
c7 fc connected unconfigured unknown
root@Node1 # cfgadm -c configure c4 c5 c6 c7
3. Run devfsadmin to configure new devices
root@Node1 #devfsadm –C
(Repeat steps 2 and 3 in all cluster nodes)
4. Run format command to list all the disks, the newly configred disk can be seen at top of format as below (if the disk not labeled already)
root@Node1 # format
Searching for disks...done
c8t6005076305FFC08C0000000000000103d0: configured with capacity of 99.98GB
c8t6005076305FFC08C0000000000000104d0: configured with capacity of 99.98GB
c8t6005076305FFC08C0000000000000120d0: configured with capacity of 99.98GB
5. Format each disk to create a partition as below.
s7 ->100mb (this 100 mb is reseverd for metadb creation. Not mandatory)
s0 -> remaining space.
6. Create corresponding cluster devices (global device path) using scgdevs command.
root@Node2 # scgdevs
Configuring DID devices
did instance 95 created.
did subpath Node2:/dev/rdsk/c8t6005076305FFC08C0000000000000120d0 created for instance 95.
did instance 96 created.
did subpath Node2:/dev/rdsk/c8t6005076305FFC08C0000000000000104d0 created for instance 96.
did instance 97 created.
did subpath Node2:/dev/rdsk/c8t6005076305FFC08C0000000000000103d0 created for instance 97.
Configuring the /dev/global directory (global devices)
obtaining access to all attached disks
(above command resulted in createing d95, d96, d97 devices)
7. Confirm this devices are available on both nodes. There must be same devices with each hostname as given below.
root@Node2 # scdidadm -L|egrep 'd95|d96|d97'
95 Node2:/dev/rdsk/c8t6005076305FFC08C0000000000000120d0 /dev/did/rdsk/d95
95 Node1:/dev/rdsk/c8t6005076305FFC08C0000000000000120d0 /dev/did/rdsk/d95
96 Node2:/dev/rdsk/c8t6005076305FFC08C0000000000000104d0 /dev/did/rdsk/d96
96 Node1:/dev/rdsk/c8t6005076305FFC08C0000000000000104d0 /dev/did/rdsk/d96
97 Node2:/dev/rdsk/c8t6005076305FFC08C0000000000000103d0 /dev/did/rdsk/d97
97 Node1:/dev/rdsk/c8t6005076305FFC08C0000000000000103d0 /dev/did/rdsk/d97
Following steps must be done on the system which has the ownership of this metaset (metaset -s apps-ms and confirm who is the owner)
8. Adding all the three devices with curresponding metaset (apps-ms)
root@Node2 # metaset -s apps-ms -a /dev/did/rdsk/d95 /dev/did/rdsk/d96 /dev/did/rdsk/d97
9. Attach this devices with specific meta devices (here it’s d300) using metattach command.
root@Node2 # metattach -s apps-ms d300 /dev/did/rdsk/d95s0 /dev/did/rdsk/d96s0 /dev/did/rdsk/d97s0
apps-ms/d300: components are attached
10. Confirm the devices are attached properly using below command.
root@Node2 # metastat -s apps-ms -p d300 apps-ms/d300 2 3 d6s0 d7s0 d8s0 -i 32b \
3 d95s0 d96s0 d97s0 -i 32b
11. Once the above result is confirmed, file system can be grown using below command.
root@Node2 # growfs -M /apps/data /dev/md/apps-ms/rdsk/d300
/dev/md/apps-ms/rdsk/d300: 1257996288 sectors in 76782 cylinders of 64 tracks, 256 sectors
614256.0MB in 12797 cyl groups (6 c/g, 48.00MB/g, 5824 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
32, 98592, 197152, 295712, 394272, 492832, 591392, 689952, 788512, 887072,
Initializing cylinder groups:
...............................................................................
...............................................................................
...............................................................................
..................
super-block backups for last 10 cylinder groups at:
1257026336, 1257124896, 1257223456, 1257322016, 1257420576, 1257519136,
1257617696, 1257716256, 1257814816, 1257913376,
12. After successfull execution of above command, the file system has been grow. Now its around 600G.
root@Node2 # df -h|grep d300
/dev/md/apps-ms/dsk/d300 591G 258G 330G 44% /apps/data
13. Below is the corresponding logs generated in /var/adm/messages during above activity.
System Logs:
Dec 21 10:07:21 Node1 Cluster.devices.did: [ID 287043 daemon.notice] did subpath /dev/rdsk/c8t6005076305FFC08C0000000000000120d0s2 created for instance 95.
Dec 21 10:07:22 Node1 Cluster.devices.did: [ID 536626 daemon.notice] did subpath /dev/rdsk/c8t6005076305FFC08C0000000000000104d0s2 created for instance 96.
Dec 21 10:07:22 Node1 Cluster.devices.did: [ID 624417 daemon.notice] did subpath /dev/rdsk/c8t6005076305FFC08C0000000000000103d0s2 created for instance 97.
Dec 21 10:07:22 Node1 Cluster.scdpmd: [ID 922726 daemon.notice] The status of device: /dev/did/rdsk/d95s0 is set to MONITORED
Dec 21 10:07:22 Node1 Cluster.scdpmd: [ID 922726 daemon.notice] The status of device: /dev/did/rdsk/d96s0 is set to MONITORED
Dec 21 10:07:22 Node1 Cluster.scdpmd: [ID 489913 daemon.notice] The state of the path to device: /dev/did/rdsk/d96s0 has changed to OK
Dec 21 10:07:22 Node1 Cluster.scdpmd: [ID 489913 daemon.notice] The state of the path to device: /dev/did/rdsk/d95s0 has changed to OK
Dec 21 10:07:22 Node1 Cluster.scdpmd: [ID 922726 daemon.notice] The status of device: /dev/did/rdsk/d97s0 is set to MONITORED
Dec 21 10:07:22 Node1 Cluster.scdpmd: [ID 489913 daemon.notice] The state of the path to device: /dev/did/rdsk/d97s0 has changed to OK
Dec 21 10:07:39 Node1 Cluster.devices.did: [ID 466922 daemon.notice] obtaining access to all attached disks
Setup Details:
Number of Nodes: 2
Node Name: Node1 and Node2
Cluster: Sun Cluster 3.2
OS: Solaris 9/10
I want to add 300G (100x3) SAN LUNs with one of the cluster mount point (/apps/data).
root@Node2 # df -h|grep d300
/dev/md/apps-ms/dsk/d300 295G 258G 35G 89% /apps/data
1. Add disks to both systems (shared) in SAN
2. Configure all the fiber channels on both nodes with below steps.
root@Node1 # cfgadm -al|grep fc
c4 fc-fabric connected configured unknown
c5 fc connected unconfigured unknown
c6 fc-fabric connected configured unknown
c7 fc connected unconfigured unknown
root@Node1 # cfgadm -c configure c4 c5 c6 c7
3. Run devfsadmin to configure new devices
root@Node1 #devfsadm –C
(Repeat steps 2 and 3 in all cluster nodes)
4. Run format command to list all the disks, the newly configred disk can be seen at top of format as below (if the disk not labeled already)
root@Node1 # format
Searching for disks...done
c8t6005076305FFC08C0000000000000103d0: configured with capacity of 99.98GB
c8t6005076305FFC08C0000000000000104d0: configured with capacity of 99.98GB
c8t6005076305FFC08C0000000000000120d0: configured with capacity of 99.98GB
5. Format each disk to create a partition as below.
s7 ->100mb (this 100 mb is reseverd for metadb creation. Not mandatory)
s0 -> remaining space.
6. Create corresponding cluster devices (global device path) using scgdevs command.
root@Node2 # scgdevs
Configuring DID devices
did instance 95 created.
did subpath Node2:/dev/rdsk/c8t6005076305FFC08C0000000000000120d0 created for instance 95.
did instance 96 created.
did subpath Node2:/dev/rdsk/c8t6005076305FFC08C0000000000000104d0 created for instance 96.
did instance 97 created.
did subpath Node2:/dev/rdsk/c8t6005076305FFC08C0000000000000103d0 created for instance 97.
Configuring the /dev/global directory (global devices)
obtaining access to all attached disks
(above command resulted in createing d95, d96, d97 devices)
7. Confirm this devices are available on both nodes. There must be same devices with each hostname as given below.
root@Node2 # scdidadm -L|egrep 'd95|d96|d97'
95 Node2:/dev/rdsk/c8t6005076305FFC08C0000000000000120d0 /dev/did/rdsk/d95
95 Node1:/dev/rdsk/c8t6005076305FFC08C0000000000000120d0 /dev/did/rdsk/d95
96 Node2:/dev/rdsk/c8t6005076305FFC08C0000000000000104d0 /dev/did/rdsk/d96
96 Node1:/dev/rdsk/c8t6005076305FFC08C0000000000000104d0 /dev/did/rdsk/d96
97 Node2:/dev/rdsk/c8t6005076305FFC08C0000000000000103d0 /dev/did/rdsk/d97
97 Node1:/dev/rdsk/c8t6005076305FFC08C0000000000000103d0 /dev/did/rdsk/d97
Following steps must be done on the system which has the ownership of this metaset (metaset -s apps-ms and confirm who is the owner)
8. Adding all the three devices with curresponding metaset (apps-ms)
root@Node2 # metaset -s apps-ms -a /dev/did/rdsk/d95 /dev/did/rdsk/d96 /dev/did/rdsk/d97
9. Attach this devices with specific meta devices (here it’s d300) using metattach command.
root@Node2 # metattach -s apps-ms d300 /dev/did/rdsk/d95s0 /dev/did/rdsk/d96s0 /dev/did/rdsk/d97s0
apps-ms/d300: components are attached
10. Confirm the devices are attached properly using below command.
root@Node2 # metastat -s apps-ms -p d300 apps-ms/d300 2 3 d6s0 d7s0 d8s0 -i 32b \
3 d95s0 d96s0 d97s0 -i 32b
11. Once the above result is confirmed, file system can be grown using below command.
root@Node2 # growfs -M /apps/data /dev/md/apps-ms/rdsk/d300
/dev/md/apps-ms/rdsk/d300: 1257996288 sectors in 76782 cylinders of 64 tracks, 256 sectors
614256.0MB in 12797 cyl groups (6 c/g, 48.00MB/g, 5824 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
32, 98592, 197152, 295712, 394272, 492832, 591392, 689952, 788512, 887072,
Initializing cylinder groups:
...............................................................................
...............................................................................
...............................................................................
..................
super-block backups for last 10 cylinder groups at:
1257026336, 1257124896, 1257223456, 1257322016, 1257420576, 1257519136,
1257617696, 1257716256, 1257814816, 1257913376,
12. After successfull execution of above command, the file system has been grow. Now its around 600G.
root@Node2 # df -h|grep d300
/dev/md/apps-ms/dsk/d300 591G 258G 330G 44% /apps/data
13. Below is the corresponding logs generated in /var/adm/messages during above activity.
System Logs:
Dec 21 10:07:21 Node1 Cluster.devices.did: [ID 287043 daemon.notice] did subpath /dev/rdsk/c8t6005076305FFC08C0000000000000120d0s2 created for instance 95.
Dec 21 10:07:22 Node1 Cluster.devices.did: [ID 536626 daemon.notice] did subpath /dev/rdsk/c8t6005076305FFC08C0000000000000104d0s2 created for instance 96.
Dec 21 10:07:22 Node1 Cluster.devices.did: [ID 624417 daemon.notice] did subpath /dev/rdsk/c8t6005076305FFC08C0000000000000103d0s2 created for instance 97.
Dec 21 10:07:22 Node1 Cluster.scdpmd: [ID 922726 daemon.notice] The status of device: /dev/did/rdsk/d95s0 is set to MONITORED
Dec 21 10:07:22 Node1 Cluster.scdpmd: [ID 922726 daemon.notice] The status of device: /dev/did/rdsk/d96s0 is set to MONITORED
Dec 21 10:07:22 Node1 Cluster.scdpmd: [ID 489913 daemon.notice] The state of the path to device: /dev/did/rdsk/d96s0 has changed to OK
Dec 21 10:07:22 Node1 Cluster.scdpmd: [ID 489913 daemon.notice] The state of the path to device: /dev/did/rdsk/d95s0 has changed to OK
Dec 21 10:07:22 Node1 Cluster.scdpmd: [ID 922726 daemon.notice] The status of device: /dev/did/rdsk/d97s0 is set to MONITORED
Dec 21 10:07:22 Node1 Cluster.scdpmd: [ID 489913 daemon.notice] The state of the path to device: /dev/did/rdsk/d97s0 has changed to OK
Dec 21 10:07:39 Node1 Cluster.devices.did: [ID 466922 daemon.notice] obtaining access to all attached disks
Wednesday, June 29, 2011
OS Watcher (OSW) and Lite Onboard Monitor (LTOM)
The following four new white papers have just been released by Oracle's Center of Expertise:
10g Upgrade Companion
Determining CPU Resource Usage for Linux and Unix
Measuring Memory Usage for Linux and Unix
Best Practices for Load Testing
I checked the second and third white papers, both of which are written by Roger Snyde from Oracle Support's Center of Expertise. These white papers describe a tool called OSW (OS Watcher) . Oracle Support’s Center of Expertise has developed OSWatcher, a script-based tool for Unix and Linux systems that runs and archives output from a number of operating system monitoring utilities, such as vmstat, top, iostat, mpstat and ps.
OSWatcher is available from Metalink as note 301137.1. It is a shell script tool and will run on Unix and Linux servers. It operates as a background process and runs the native operating system utilities at user-settable intervals, by default 30 seconds, and retains an archive of the output for a user settable period, defaulting to 48 hours. This value may be increased in order to retain more information when evaluating performance, and to capture baseline information during important cycle-end periods.
Oracle recommends customers download and install OSWatcher on all production and test servers that need to be monitored.
While going through 301137.1, I found the mention of another tool called LTOM(The embedded Lite Onboard Monitor): To collect database metrics in addition to OS metrics consider running LTOM. The Lite Onboard Monitor (LTOM) is a java program designed as a real-time diagnostic platform for deployment to a customer site. LTOM differs from other support tools, as it is proactive rather than reactive. LTOM provides real-time automatic problem detection and data collection. LTOM runs on the customer's UNIX server, is tightly integrated with the host operating system and provides an integrated solution for detecting and collecting trace files for system performance issues. The ability to detect problems and collect data in real-time will hopefully reduce the amount of time it takes to solve problems and reduce customer downtime.
Both OSW and LTOM now provide a graphing utility to graph the data collected. This greatly reduces the need to manually inspect all the output files.
OSWatcher:
used OSWatcher to monitor CPU/Memory/Network to investigate the problem on servers. I think It's easy to setup. But I have to download it from metalink.
OS Watcher (OSW) is a collection of UNIX shell scripts intended to collect and archive operating system and network metrics to aid support in diagnosing performance issues. We can download it from metalink. OSW operates as a set of background processes on the server and gathers OS data on a regular basis, invoking such Unix utilities as vmstat, netstat and iostat.
More detail: metalink: 301137.1
After I downloaded it from metalink. It's time to setup:
$ ls osw212.tar
osw212.tar
$ tar xvf osw212.tar
./
./osw/
./osw/Exampleprivate.net
./osw/OSWatcher.sh
./osw/OSWatcherFM.sh
./osw/profile/
./osw/oswnet.sh
./osw/oswsub.sh
./osw/startOSW.sh
./osw/stopOSW.sh
./osw/tarupfiles.sh
./osw/topaix.sh
./osw/README
./osw/OSWgREADME
./osw/src/
./osw/src/OSW_profile.htm
./osw/src/coe_logo.gif
./osw/src/oswg_input.txt
./osw/src/missing_graphic.gif
./osw/src/tombody.gif
./osw/src/watch.gif
./osw/gif/
./osw/oswlnxtop.sh
./osw/private.net
./osw/oswlnxio.sh
./osw/oswg.jar
./osw/tmp/
$ cd osw
Just extract from tar file... read README file and get idea with utility commands:
startOSW.sh script:
need 2 arguments which control the frequency that data is collected and the number of hours worth of data to archive.
An optional 3rd argument allows the user to specify a zip utility name to compressthe files after they have been created:
ARG1 = snapshot interval in seconds (default 30 seconds).
ARG2 = the number of hours of archive data to store (default 48 hours)
ARG3 (optional) = the name of the zip utility to run if the user wants to compress the files automatically after creation.
Example:
./startOSW.sh
Info...You did not enter a value for snapshotInterval.
Info...Using default value = 30
Info...You did not enter a value for archiveInterval.
Info...Using default value = 48
.
.
./startOSW.sh 60 10 gzip
Info...Zip option IS specified.
Info...OSW will use gzip to compress files.
.
.
Starting OSWatcher V2.1.2 on Tue Jul 21 11:16:40 ICT 2009
With SnapshotInterval = 60
With ArchiveInterval = 10
.
.
stopOSW.sh script:
Example:
./stopOSW.sh
Or use "OSWatcher.sh" run to test:
$ ./OSWatcher.sh
Info...You did not enter a value for snapshotInterval.
Info...Using default value = 30
Info...You did not enter a value for archiveInterval.
Info...Using default value = 48
Testing for discovery of OS Utilities...
VMSTAT found on your system.
IOSTAT found on your system.
MPSTAT found on your system.
NETSTAT found on your system.
TOP found on your system.
Discovery completed.
Starting OSWatcher V2.1.2 on Tue Jul 21 10:29:55 ICT 2009
With SnapshotInterval = 30
With ArchiveInterval = 48
OSWatcher - Written by Carl Davis, Center of Expertise, Oracle Corporation
Starting Data Collection...
osw heartbeat:Tue Jul 21 10:29:55 ICT 2009
.
.
CTRL+C
It's time to show it (TEST): Starting
$ ./startOSW.sh
Info...You did not enter a value for snapshotInterval.
Info...Using default value = 30
Info...You did not enter a value for archiveInterval.
Info...Using default value = 48
Testing for discovery of OS Utilities...
VMSTAT found on your system.
IOSTAT found on your system.
MPSTAT found on your system.
NETSTAT found on your system.
TOP found on your system.
Discovery completed.
Starting OSWatcher V2.1.2 on Tue Jul 21 10:34:24 ICT 2009
With SnapshotInterval = 30
With ArchiveInterval = 48
OSWatcher - Written by Carl Davis, Center of Expertise, Oracle Corporation
Starting Data Collection...
osw heartbeat:Tue Jul 21 10:34:24 ICT 2009
osw heartbeat:Tue Jul 21 10:34:55 ICT 2009
osw heartbeat:Tue Jul 21 10:35:25 ICT 2009
.
.
.
monitor!... and want to stop:
$ ./stopOSW.sh
Terminated
What I see?
Archives 're stored in osw/archive/ PATH.
$ find ./archive/ -type f
./archive/oswiostat/oratest01_iostat_09.07.21.1000.dat
./archive/oswslabinfo/oratest01_slabinfo_09.07.21.1000.dat
./archive/oswprvtnet/oratest01_prvtnet_09.07.21.1000.dat
./archive/oswps/oratest01_ps_09.07.21.1000.dat
./archive/oswtop/oratest01_top_09.07.21.1000.dat
./archive/oswvmstat/oratest01_vmstat_09.07.21.1000.dat
./archive/oswmeminfo/oratest01_meminfo_09.07.21.1000.dat
./archive/oswnetstat/oratest01_netstat_09.07.21.1000.dat
./archive/oswmpstat/oratest01_mpstat_09.07.21.1000.dat
.
.
.
From Archive Files, that can see stats. and use archives to make graph as well:
use OSWg(more detail: metalink 461053.1) generate graph (requires as a minimum java version 1.4.2 or higher), and need X-windows.
read OSWgREADME File to help generate Graph.
and test with some archives:
$ $ORACLE_HOME/jdk/bin/java -version
java version "1.4.2_14"
$ $ORACLE_HOME/jdk/bin/java -jar oswg.jar -i archive/
Starting OSWg V2.1.2
OSWatcher Graph Written by Oracle Center of Expertise
Copyright (c) 2008 by Oracle Corporation
Parsing Data. Please Wait...
Parsing file oratest01_iostat_09.07.21.1000.dat ...
Parsing file oratest01_iostat_09.07.21.1100.dat ...
.
.
.
Parsing Completed.
Enter 1 to Display CPU Process Queue Graphs
Enter 2 to Display CPU Utilization Graphs
Enter 3 to Display CPU Other Graphs
Enter 4 to Display Memory Graphs
Enter 5 to Display Disk IO Graphs
Enter 6 to Generate All CPU Gif Files
Enter 7 to Generate All Memory Gif Files
Enter 8 to Generate All Disk Gif Files
Enter L to Specify Alternate Location of Gif Directory
Enter T to Specify Different Time Scale
Enter D to Return to Default Time Scale
Enter R to Remove Currently Displayed Graphs
Enter P to Generate A Profile
Enter Q to Quit Program
Please Select an Option:5
The Following Devices and Average Service Times Are Ready to Display:
Device Name Average Service Times in Milliseconds
sda 2.0477464788732385
sdb 1.192676056338029
Specify A Case Sensitive Device Name to View (Q to exit): sda
10g Upgrade Companion
Determining CPU Resource Usage for Linux and Unix
Measuring Memory Usage for Linux and Unix
Best Practices for Load Testing
I checked the second and third white papers, both of which are written by Roger Snyde from Oracle Support's Center of Expertise. These white papers describe a tool called OSW (OS Watcher) . Oracle Support’s Center of Expertise has developed OSWatcher, a script-based tool for Unix and Linux systems that runs and archives output from a number of operating system monitoring utilities, such as vmstat, top, iostat, mpstat and ps.
OSWatcher is available from Metalink as note 301137.1. It is a shell script tool and will run on Unix and Linux servers. It operates as a background process and runs the native operating system utilities at user-settable intervals, by default 30 seconds, and retains an archive of the output for a user settable period, defaulting to 48 hours. This value may be increased in order to retain more information when evaluating performance, and to capture baseline information during important cycle-end periods.
Oracle recommends customers download and install OSWatcher on all production and test servers that need to be monitored.
While going through 301137.1, I found the mention of another tool called LTOM(The embedded Lite Onboard Monitor): To collect database metrics in addition to OS metrics consider running LTOM. The Lite Onboard Monitor (LTOM) is a java program designed as a real-time diagnostic platform for deployment to a customer site. LTOM differs from other support tools, as it is proactive rather than reactive. LTOM provides real-time automatic problem detection and data collection. LTOM runs on the customer's UNIX server, is tightly integrated with the host operating system and provides an integrated solution for detecting and collecting trace files for system performance issues. The ability to detect problems and collect data in real-time will hopefully reduce the amount of time it takes to solve problems and reduce customer downtime.
Both OSW and LTOM now provide a graphing utility to graph the data collected. This greatly reduces the need to manually inspect all the output files.
OSWatcher:
used OSWatcher to monitor CPU/Memory/Network to investigate the problem on servers. I think It's easy to setup. But I have to download it from metalink.
OS Watcher (OSW) is a collection of UNIX shell scripts intended to collect and archive operating system and network metrics to aid support in diagnosing performance issues. We can download it from metalink. OSW operates as a set of background processes on the server and gathers OS data on a regular basis, invoking such Unix utilities as vmstat, netstat and iostat.
More detail: metalink: 301137.1
After I downloaded it from metalink. It's time to setup:
$ ls osw212.tar
osw212.tar
$ tar xvf osw212.tar
./
./osw/
./osw/Exampleprivate.net
./osw/OSWatcher.sh
./osw/OSWatcherFM.sh
./osw/profile/
./osw/oswnet.sh
./osw/oswsub.sh
./osw/startOSW.sh
./osw/stopOSW.sh
./osw/tarupfiles.sh
./osw/topaix.sh
./osw/README
./osw/OSWgREADME
./osw/src/
./osw/src/OSW_profile.htm
./osw/src/coe_logo.gif
./osw/src/oswg_input.txt
./osw/src/missing_graphic.gif
./osw/src/tombody.gif
./osw/src/watch.gif
./osw/gif/
./osw/oswlnxtop.sh
./osw/private.net
./osw/oswlnxio.sh
./osw/oswg.jar
./osw/tmp/
$ cd osw
Just extract from tar file... read README file and get idea with utility commands:
startOSW.sh script:
need 2 arguments which control the frequency that data is collected and the number of hours worth of data to archive.
An optional 3rd argument allows the user to specify a zip utility name to compressthe files after they have been created:
ARG1 = snapshot interval in seconds (default 30 seconds).
ARG2 = the number of hours of archive data to store (default 48 hours)
ARG3 (optional) = the name of the zip utility to run if the user wants to compress the files automatically after creation.
Example:
./startOSW.sh
Info...You did not enter a value for snapshotInterval.
Info...Using default value = 30
Info...You did not enter a value for archiveInterval.
Info...Using default value = 48
.
.
./startOSW.sh 60 10 gzip
Info...Zip option IS specified.
Info...OSW will use gzip to compress files.
.
.
Starting OSWatcher V2.1.2 on Tue Jul 21 11:16:40 ICT 2009
With SnapshotInterval = 60
With ArchiveInterval = 10
.
.
stopOSW.sh script:
Example:
./stopOSW.sh
Or use "OSWatcher.sh" run to test:
$ ./OSWatcher.sh
Info...You did not enter a value for snapshotInterval.
Info...Using default value = 30
Info...You did not enter a value for archiveInterval.
Info...Using default value = 48
Testing for discovery of OS Utilities...
VMSTAT found on your system.
IOSTAT found on your system.
MPSTAT found on your system.
NETSTAT found on your system.
TOP found on your system.
Discovery completed.
Starting OSWatcher V2.1.2 on Tue Jul 21 10:29:55 ICT 2009
With SnapshotInterval = 30
With ArchiveInterval = 48
OSWatcher - Written by Carl Davis, Center of Expertise, Oracle Corporation
Starting Data Collection...
osw heartbeat:Tue Jul 21 10:29:55 ICT 2009
.
.
CTRL+C
It's time to show it (TEST): Starting
$ ./startOSW.sh
Info...You did not enter a value for snapshotInterval.
Info...Using default value = 30
Info...You did not enter a value for archiveInterval.
Info...Using default value = 48
Testing for discovery of OS Utilities...
VMSTAT found on your system.
IOSTAT found on your system.
MPSTAT found on your system.
NETSTAT found on your system.
TOP found on your system.
Discovery completed.
Starting OSWatcher V2.1.2 on Tue Jul 21 10:34:24 ICT 2009
With SnapshotInterval = 30
With ArchiveInterval = 48
OSWatcher - Written by Carl Davis, Center of Expertise, Oracle Corporation
Starting Data Collection...
osw heartbeat:Tue Jul 21 10:34:24 ICT 2009
osw heartbeat:Tue Jul 21 10:34:55 ICT 2009
osw heartbeat:Tue Jul 21 10:35:25 ICT 2009
.
.
.
monitor!... and want to stop:
$ ./stopOSW.sh
Terminated
What I see?
Archives 're stored in osw/archive/ PATH.
$ find ./archive/ -type f
./archive/oswiostat/oratest01_iostat_09.07.21.1000.dat
./archive/oswslabinfo/oratest01_slabinfo_09.07.21.1000.dat
./archive/oswprvtnet/oratest01_prvtnet_09.07.21.1000.dat
./archive/oswps/oratest01_ps_09.07.21.1000.dat
./archive/oswtop/oratest01_top_09.07.21.1000.dat
./archive/oswvmstat/oratest01_vmstat_09.07.21.1000.dat
./archive/oswmeminfo/oratest01_meminfo_09.07.21.1000.dat
./archive/oswnetstat/oratest01_netstat_09.07.21.1000.dat
./archive/oswmpstat/oratest01_mpstat_09.07.21.1000.dat
.
.
.
From Archive Files, that can see stats. and use archives to make graph as well:
use OSWg(more detail: metalink 461053.1) generate graph (requires as a minimum java version 1.4.2 or higher), and need X-windows.
read OSWgREADME File to help generate Graph.
and test with some archives:
$ $ORACLE_HOME/jdk/bin/java -version
java version "1.4.2_14"
$ $ORACLE_HOME/jdk/bin/java -jar oswg.jar -i archive/
Starting OSWg V2.1.2
OSWatcher Graph Written by Oracle Center of Expertise
Copyright (c) 2008 by Oracle Corporation
Parsing Data. Please Wait...
Parsing file oratest01_iostat_09.07.21.1000.dat ...
Parsing file oratest01_iostat_09.07.21.1100.dat ...
.
.
.
Parsing Completed.
Enter 1 to Display CPU Process Queue Graphs
Enter 2 to Display CPU Utilization Graphs
Enter 3 to Display CPU Other Graphs
Enter 4 to Display Memory Graphs
Enter 5 to Display Disk IO Graphs
Enter 6 to Generate All CPU Gif Files
Enter 7 to Generate All Memory Gif Files
Enter 8 to Generate All Disk Gif Files
Enter L to Specify Alternate Location of Gif Directory
Enter T to Specify Different Time Scale
Enter D to Return to Default Time Scale
Enter R to Remove Currently Displayed Graphs
Enter P to Generate A Profile
Enter Q to Quit Program
Please Select an Option:5
The Following Devices and Average Service Times Are Ready to Display:
Device Name Average Service Times in Milliseconds
sda 2.0477464788732385
sdb 1.192676056338029
Specify A Case Sensitive Device Name to View (Q to exit): sda
Tuesday, June 28, 2011
Custom Logrotate in Solaris 10
Here I explain how to configure logadm to rotage any system wide files according to given criteria.
1. Add the corresponding entries in /etc/logadm.conf in below format.
root@server1 # tail -3 /etc/logadm.conf
/var/adm/wtmpx -A 1m -o adm -g adm -m 664 -p 1d -t '$file.old.%Y%m%d_%H%M' -z 1
/var/adm/wtmpx -A 1m -g adm -m 664 -o adm -p 1w -t '$file.old.%Y%m%d_%H%M' -z 5
/var/adm/utmpx -A 1m -g adm -m 664 -o adm -p 1w -t '$file.old.%Y%m%d_%H%M' -z 5
/var/adm/loginlog -A 1m -g sys -m 700 -o root -p 1w -t '$file.old.%Y%m%d_%H%M' -z 5
Explanation for each switch:
-A ->Delete any versions that have not been modified for the amount of time specified by age. Specify age as a number followed by an h (hours), d (days), w(weeks), m (months), or y (years).
-o -> the owner of the newly creating empty file
-g-> the group of newly creating file
-m ->mode of the new empty file (chmod xxx)
-p -> Rotate a log file after the specified time period (period as d, w, m, y)
-t -> Specify the template to use when renaming log files (Here, wtmpx.old.20101225_0757) (see man logadm for more info)
-z ->How many copy of rotaged files needs to retain on the system.
-P ->Used by logadm to record the last time the log was rotated in /etc/logadm.conf (no need to set this manually)
2. Once above entries are done, execute logadm -v command to run a logrotation now. Now logadm reads the /etc/logadm.conf file, and for every entry found in that file checks the corresponding log file to see if it should be rotated.
root@server1 # logadm -v
# loading /etc/logadm.conf
# processing logname: /var/log/syslog
# using default rotate rules: -s1b -p1w
# using default template: $file.$n
# processing logname: /var/adm/messages
# using default rotate rules: -s1b -p1w
# using default template: $file.$n
# processing logname: /var/cron/log
# using default expire rule: -C10
# processing logname: /var/lp/logs/lpsched
# using default rotate rules: -s1b -p1w
# processing logname: /var/fm/fmd/errlog
# using default expire rule: -C10
# using default template: $file.$n
# processing logname: /var/fm/fmd/fltlog
# using default template: $file.$n
# processing logname: smf_logs
# using default template: $file.$n
# processing logname: /var/adm/pacct
# using default template: $file.$n
# processing logname: /var/log/pool/poold
# using default expire rule: -C10
# using default template: $file.$n
# processing logname: /var/svc/log/system-webconsole:console.log
# using default rotate rules: -s1b -p1w
# using default expire rule: -C10
# using default template: $file.$n
# processing logname: /var/opt/SUNWsasm/log/sasm.log
# using default template: $file.$n
# processing logname: /var/adm/wtmpx
mkdir -p /var/adm # verify directory exists
mv -f /var/adm/wtmpx /var/adm/wtmpx.old.20101225_1250 # rotate log file
touch /var/adm/wtmpx
chown adm:adm /var/adm/wtmpx
chmod 664 /var/adm/wtmpx
# recording rotation date Sat Dec 25 12:50:51 2010 for /var/adm/wtmpx
# processing logname: /var/adm/utmpx
mkdir -p /var/adm # verify directory exists
mv -f /var/adm/utmpx /var/adm/utmpx.old.20101225_1250 # rotate log file
touch /var/adm/utmpx
chown adm:adm /var/adm/utmpx
chmod 664 /var/adm/utmpx
# recording rotation date Sat Dec 25 12:50:51 2010 for /var/adm/utmpx
# processing logname: /var/adm/loginlog
mkdir -p /var/adm # verify directory exists
mv -f /var/adm/loginlog /var/adm/loginlog.old.20101225_1250 # rotate log file
touch /var/adm/loginlog
chown root:sys /var/adm/loginlog
chmod 700 /var/adm/loginlog
# recording rotation date Sat Dec 25 12:50:51 2010 for /var/adm/loginlog
# writing changes to /etc/logadm.conf
As you can see the last line of above command, once the logadm command successfully run, it do some changes to with -P switch in /etc/logadm.conf file regarding the last update of logrotation.
root@server1 # tail -3 /etc/logadm.conf
/var/adm/wtmpx -A 1m -P 'Sat Dec 25 12:50:51 2010' -g adm -m 664 -o adm -p 1w -t '$file.old.%Y%m%d_%H%M' -z 5
/var/adm/utmpx -A 1m -P 'Sat Dec 25 12:50:51 2010' -g adm -m 664 -o adm -p 1w -t '$file.old.%Y%m%d_%H%M' -z 5
/var/adm/loginlog -A 1m -P 'Sat Dec 25 12:50:51 2010' -g sys -m 700 -o root -p 1w -t '$file.old.%Y%m%d_%H%M' -z 5
List of new files created in /var/adm
root@server1 # ls -ltr /var/adm/*.old*
-rwx------ 1 root sys 0 Dec 25 11:00 /var/adm/loginlog.old.20101225_1250
-rw-r--r-- 1 root bin 3720 Dec 25 15:49 /var/adm/utmpx.old.20101225_1250
-rw-rw-r-- 1 adm adm 8595060 Dec 25 15:51 /var/adm/wtmpx.old.20101225_1250
1. Add the corresponding entries in /etc/logadm.conf in below format.
root@server1 # tail -3 /etc/logadm.conf
/var/adm/wtmpx -A 1m -o adm -g adm -m 664 -p 1d -t '$file.old.%Y%m%d_%H%M' -z 1
/var/adm/wtmpx -A 1m -g adm -m 664 -o adm -p 1w -t '$file.old.%Y%m%d_%H%M' -z 5
/var/adm/utmpx -A 1m -g adm -m 664 -o adm -p 1w -t '$file.old.%Y%m%d_%H%M' -z 5
/var/adm/loginlog -A 1m -g sys -m 700 -o root -p 1w -t '$file.old.%Y%m%d_%H%M' -z 5
Explanation for each switch:
-A ->Delete any versions that have not been modified for the amount of time specified by age. Specify age as a number followed by an h (hours), d (days), w(weeks), m (months), or y (years).
-o -> the owner of the newly creating empty file
-g-> the group of newly creating file
-m ->mode of the new empty file (chmod xxx)
-p -> Rotate a log file after the specified time period (period as d, w, m, y)
-t -> Specify the template to use when renaming log files (Here, wtmpx.old.20101225_0757) (see man logadm for more info)
-z ->How many copy of rotaged files needs to retain on the system.
-P ->Used by logadm to record the last time the log was rotated in /etc/logadm.conf (no need to set this manually)
2. Once above entries are done, execute logadm -v command to run a logrotation now. Now logadm reads the /etc/logadm.conf file, and for every entry found in that file checks the corresponding log file to see if it should be rotated.
root@server1 # logadm -v
# loading /etc/logadm.conf
# processing logname: /var/log/syslog
# using default rotate rules: -s1b -p1w
# using default template: $file.$n
# processing logname: /var/adm/messages
# using default rotate rules: -s1b -p1w
# using default template: $file.$n
# processing logname: /var/cron/log
# using default expire rule: -C10
# processing logname: /var/lp/logs/lpsched
# using default rotate rules: -s1b -p1w
# processing logname: /var/fm/fmd/errlog
# using default expire rule: -C10
# using default template: $file.$n
# processing logname: /var/fm/fmd/fltlog
# using default template: $file.$n
# processing logname: smf_logs
# using default template: $file.$n
# processing logname: /var/adm/pacct
# using default template: $file.$n
# processing logname: /var/log/pool/poold
# using default expire rule: -C10
# using default template: $file.$n
# processing logname: /var/svc/log/system-webconsole:console.log
# using default rotate rules: -s1b -p1w
# using default expire rule: -C10
# using default template: $file.$n
# processing logname: /var/opt/SUNWsasm/log/sasm.log
# using default template: $file.$n
# processing logname: /var/adm/wtmpx
mkdir -p /var/adm # verify directory exists
mv -f /var/adm/wtmpx /var/adm/wtmpx.old.20101225_1250 # rotate log file
touch /var/adm/wtmpx
chown adm:adm /var/adm/wtmpx
chmod 664 /var/adm/wtmpx
# recording rotation date Sat Dec 25 12:50:51 2010 for /var/adm/wtmpx
# processing logname: /var/adm/utmpx
mkdir -p /var/adm # verify directory exists
mv -f /var/adm/utmpx /var/adm/utmpx.old.20101225_1250 # rotate log file
touch /var/adm/utmpx
chown adm:adm /var/adm/utmpx
chmod 664 /var/adm/utmpx
# recording rotation date Sat Dec 25 12:50:51 2010 for /var/adm/utmpx
# processing logname: /var/adm/loginlog
mkdir -p /var/adm # verify directory exists
mv -f /var/adm/loginlog /var/adm/loginlog.old.20101225_1250 # rotate log file
touch /var/adm/loginlog
chown root:sys /var/adm/loginlog
chmod 700 /var/adm/loginlog
# recording rotation date Sat Dec 25 12:50:51 2010 for /var/adm/loginlog
# writing changes to /etc/logadm.conf
As you can see the last line of above command, once the logadm command successfully run, it do some changes to with -P switch in /etc/logadm.conf file regarding the last update of logrotation.
root@server1 # tail -3 /etc/logadm.conf
/var/adm/wtmpx -A 1m -P 'Sat Dec 25 12:50:51 2010' -g adm -m 664 -o adm -p 1w -t '$file.old.%Y%m%d_%H%M' -z 5
/var/adm/utmpx -A 1m -P 'Sat Dec 25 12:50:51 2010' -g adm -m 664 -o adm -p 1w -t '$file.old.%Y%m%d_%H%M' -z 5
/var/adm/loginlog -A 1m -P 'Sat Dec 25 12:50:51 2010' -g sys -m 700 -o root -p 1w -t '$file.old.%Y%m%d_%H%M' -z 5
List of new files created in /var/adm
root@server1 # ls -ltr /var/adm/*.old*
-rwx------ 1 root sys 0 Dec 25 11:00 /var/adm/loginlog.old.20101225_1250
-rw-r--r-- 1 root bin 3720 Dec 25 15:49 /var/adm/utmpx.old.20101225_1250
-rw-rw-r-- 1 adm adm 8595060 Dec 25 15:51 /var/adm/wtmpx.old.20101225_1250
Sunday, March 13, 2011
Sun Cluster console
Sun Cluster Console - How it simplifies life even if you don't use Sun Cluster
Recently I am working with about 6 Sun Fire V440 connected to many 3510s and one of the pains is doing repetitive steps on all the 6 servers.
Enter Sun Cluster Console (part of Sun Java Enterprise System).
Basically what you need is SUNWcconsol package which after installation is available at /opt/SUNWcluster.
You have to try out /opt/SUNWcluster/bin/ctelnet.
After making sure I had the right display permissions/settings, I did
$ ctelnet v440-1 v440-2 v440-3 v440-4 v440-5 v440-6 &
It pops up 6 terminal screens and a small window containing a text box and few menu options . When I type in the small box it gets typed in all the 6 terminals. This way I can log into all the servers at the same time and do repetitive steps on all of them simultaneously saving me tremendous amount of time.
You can use the menu options to temporarily not type into any specific host and reset it back to normal later on. A tremendous time saver when you have to setup multiple boxes say for GRID or CLUSTER or HPC or DB2 DPF.
crlogin and cconsole are also available.
Recently I am working with about 6 Sun Fire V440 connected to many 3510s and one of the pains is doing repetitive steps on all the 6 servers.
Enter Sun Cluster Console (part of Sun Java Enterprise System).
Basically what you need is SUNWcconsol package which after installation is available at /opt/SUNWcluster.
You have to try out /opt/SUNWcluster/bin/ctelnet.
After making sure I had the right display permissions/settings, I did
$ ctelnet v440-1 v440-2 v440-3 v440-4 v440-5 v440-6 &
It pops up 6 terminal screens and a small window containing a text box and few menu options . When I type in the small box it gets typed in all the 6 terminals. This way I can log into all the servers at the same time and do repetitive steps on all of them simultaneously saving me tremendous amount of time.
You can use the menu options to temporarily not type into any specific host and reset it back to normal later on. A tremendous time saver when you have to setup multiple boxes say for GRID or CLUSTER or HPC or DB2 DPF.
crlogin and cconsole are also available.
Subscribe to:
Posts (Atom)