Wednesday, June 30, 2010

Joining Lines

This is a handy way to join text on seperate lines:-

$ srvctl config
DZHRAC10
DZHRAC20
DZHRAC30
DZHRON10
DZHRON20

$ srvctl config awk '{printf $0 " "}'
DZHRAC10 DZHRAC20 DZHRAC30 DZHRON10 DZHRON20

Tuesday, June 29, 2010

The number of virtual CPU's in a Solaris Server

A colleague asked me this question, after a read of the man page for psrinfo, came up with the following commands. The -p gives a count and -pv gives more information.

su78sr28# psrinfo -p
1

su78sr28# psrinfo -pv
The physical processor has 64 virtual processors (0-63)
UltraSPARC-T2 (chipid 0, clock 1415 MHz)

Tuesday, June 22, 2010

Finding process syscalls and times

$ ./procsystime -eT find /cs/oracle/product -name orapwDZHRAC10 -ls
124566 1 lrwxrwxrwx 1 oracle oinstall 38 Jun 7 09:39 /cs/oracle/product/11.2.0.1/dbs/orapwDZHRAC10 -> /dev/oracle/dbpw.500F3AB16FB.100.0.lun
Elapsed Times for command find /cs/oracle/product -name orapwDZHRAC10 -ls,
SYSCALL TIME (ns)
getrlimit 7778
getpid 9588
gtime 11216
chdir 15558
setcontext 15919
getuid 22160
readlink 27950
open64 39075
getcwd 40614
brk 60876
ioctl 62593
write 64493
read 69016
munmap 79961
acl 113518
pathconf 159830
stat64 175840
resolvepath 192936
memcntl 236985
open 261320
doorfs 306726
mmap 716657
fcntl 25747535
close 40922114
fsat 69467272
fchdir 75380605
fstat64 79424661
getdents64 200178852
lstat64 826298914
TOTAL: 1320110562