I'm trying to prove that I've fixed a bug and I happen to know that if a certain function returns an error code, then I might have hit the code in question. How do I quickly determine whether or not I have hit such a case?
[root@pnfs-3-11 ~/dtrace]> more mms.d
#! /usr/sbin/dtrace -Fs
:nfs:nfs4_trigger_mount:return
/args[1] != 0/
{
printf("rc1 = %d\n", args[1]);
}
:nfs:nfs4_ephemeral_umount:return
/args[1] != 0/
{
printf("rc1 = %d\n", args[1]);
}
[root@pnfs-3-11 ~/dtrace]> ./mms.d
dtrace: script './mms.d' matched 2 probes
CPU FUNCTION
0 <- nfs4_ephemeral_umount rc1 = 16
0 <- nfs4_ephemeral_umount rc1 = 16
So if the function name is nfs4_trigger_mount or nfs4_ephemeral_umount, then print the return code if it is not 0. Hmm, I should probably remove the '\n's.
[root@pnfs-3-11 ~/dtrace]> ./mms.d dtrace: script './mms.d' matched 2 probes CPU FUNCTION 1 <- nfs4_ephemeral_umount rc1 = 16 1 <- nfs4_ephemeral_umount rc1 = 16
I'm actually looking for an 11 (EAGAIN) coming back from nfs4_trigger_mount, but the abundance of 16 (EBUSY) from nfs4_ephemeral_umount tells me I've probably fixed another bug I was hitting.
Trying to run a test program which needs rsh, and I'm getting:
# rsh pnfs-3-11.central w pnfs-3-11.central.sun.com: Connection refused
Evidently rshd is not running. There is plenty of info on how to get it running pre-Solaris 10. Hmm, how do I get started with smf?
# svcadm enable svc:/network/shell:default # svcadm enable svc:/network/login:rlogin
I threw in rlogin for free!
Make sure to fill in your /etc/hosts and .rhosts files as needed.
# rsh pnfs-3-11.central w 1:58pm up 9 min(s), 1 user, load average: 0.00, 0.05, 0.05 User tty login@ idle JCPU PCPU what root pts/1 1:50pm 6 -sh