df command on Sol8 machine doesn't return a result

I have a sun4u system running Solaris 8. I tried running the df command but it returns a blank result. Also I'm unable to collect an explorer from this system as the OS complains that the disk is full. What could be going on here?

I've seen that... weird as it sounds I had something happen to a few of the unix tools (grep and something else.... can't remember) on one box. Something (or someone) overwrote them with a 0 byte file....

Try this:
find / -name df

Then cop/paste the full path returned by find and then do a:
ls -lh (cut and pasted path)

What is the file size? Do the permissions look ok?

lrwxrwxrwx   1 root     root          10 May 23  2007 /usr/bin/df -> ../sbin/df
-r-xr-xr-x   1 root     bin        16124 Jan  5  2000 /usr/lib/fs/ufs/df
-r-xr-xr-x   1 root     bin        23924 Jan  8  2000 /usr/sbin/df
-rwxr-xr-x   1 root     bin          624 Jan  5  2000 /usr/ucb/df
-r-xr-xr-x   1 root     bin        23980 Jan  8  2000 /usr/xpg4/bin/df

Looks right. However only /usr/lib/fs/ufs/df returns any results (just the ufs mounted filesystems).

I'm concerned about filesystem corruption. I occasionally see files that exists but really are not there. I get occasional file I/O errors.

What exactly do you mean you see files that exists but really are not there? Do you mean you can access the contents? Or the file disappears? Either case that would worry me as well.

It almost sounds like you may be out of inodes.
http://www.gaeltd.com/solaris-file-system-says-its-full-but-theres-plenty-of-free-space/

If it is not an inode problem then consider running chkrootkit on the box just in case. It may be correct but I don't like the fact /usr/sbin/df and /usr/xpg4/bin/df have the same date but are different sizes. chkrootkit for Solaris 8 is available at sunfreeware:
Freeware List for SPARC and Solaris 8

If that doesn't pan out then you may have to fsck the file system. If feasible, a flar of the file system beforehand wouldn't hurt just in case things turn horrible. You can also get flar at sunfreeware.com

Run a du command and check the output against the results from your df output. I've seen this happen when people delete open files. Depending of the filesystem, you'll have to reboot or run an fsck on the filesystem as mainegeek suggested.

Filesystem             iused   ifree  %iused  Mounted on
/dev/md/dsk/d1          5033  252567     2%   /
/dev/md/dsk/d2         24983  319465     7%   /usr
/dev/md/dsk/d3          3290  341158     1%   /var
/dev/md/dsk/d4         71893 3369259     2%   /local

/usr/sbin/mkfs -m /dev/md/dsk/d1
mkfs -F ufs -o nsect=107,ntrack=27,bsize=8192,fragsize=1024,cgsize=32,free=6,rps=167,nbpi=4114,opt=t,apc=0,gap=0,nrpos=8,maxcontig=16 /dev/md/dsk/d1 2097414


/usr/sbin/mkfs -m /dev/md/dsk/d2
mkfs -F ufs -o nsect=107,ntrack=27,bsize=8192,fragsize=1024,cgsize=32,free=3,rps=167,nbpi=6170,opt=t,apc=0,gap=0,nrpos=8,maxcontig=16 /dev/md/dsk/d2 4194828

/usr/sbin/mkfs -m /dev/md/dsk/d3
mkfs -F ufs -o nsect=107,ntrack=27,bsize=8192,fragsize=1024,cgsize=32,free=3,rps=167,nbpi=6170,opt=t,apc=0,gap=0,nrpos=8,maxcontig=16 /dev/md/dsk/d3 4194828

/usr/sbin/mkfs -m /dev/md/dsk/d4
mkfs -F ufs -o nsect=107,ntrack=27,bsize=8192,fragsize=1024,cgsize=32,free=1,rps=167,nbpi=8227,opt=t,apc=0,gap=0,nrpos=8,maxcontig=16 /dev/md/dsk/d4 56422170

/usr/sbin/mkfs -m /dev/md/dsk/d5
mkfs: FSType swap not installed in the kernel

Ran chkrootkit and nothing was found. Mind you that this is a development/QA machine. It may have been altered to simulate a test scenario.

Run a

truss df > /tmp/df.output

and provide it for review.

What do you get for:

df -l
(i.e. ignoring NFS mounts)

mount
(Anything missing? Is the command slow?)

sar -v
(Have you exceeded maxproc?)
execve("/usr/sbin/df", 0xFFBEFC0C, 0xFFBEFC14)  argc = 1
resolvepath("/usr/lib/ld.so.1", "/usr/lib/ld.so.1", 1023) = 16
open("/var/ld/ld.config", O_RDONLY)             = 3
fstat(3, 0xFFBEF458)                            = 0
mmap(0x00000000, 108, PROT_READ, MAP_SHARED, 3, 0) = 0xFF3A0000
close(3)                                        = 0
stat("/usr/lib/libcmd.so.1", 0xFFBEF4B8)        = 0
resolvepath("/usr/lib/libcmd.so.1", "/usr/lib/libcmd.so.1", 1023) = 20
open("/usr/lib/libcmd.so.1", O_RDONLY)          = 3
mmap(0x00000000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xFF390000
mmap(0x00000000, 90112, PROT_NONE, MAP_PRIVATE|MAP_NORESERVE|MAP_ANON, -1, 0) = 0xFF370000
mmap(0xFF370000, 10780, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xFF370000
mmap(0xFF384000, 1155, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 16384) = 0xFF384000
munmap(0xFF374000, 65536)                       = 0
memcntl(0xFF370000, 4344, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
close(3)                                        = 0
stat("/usr/lib/libc.so.1", 0xFFBEF4B8)          = 0
resolvepath("/usr/lib/libc.so.1", "/usr/lib/libc.so.1", 1023) = 18
open("/usr/lib/libc.so.1", O_RDONLY)            = 3
mmap(0xFF390000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xFF390000
mmap(0x00000000, 802816, PROT_NONE, MAP_PRIVATE|MAP_NORESERVE|MAP_ANON, -1, 0) = 0xFF280000
mmap(0xFF280000, 703520, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xFF280000
mmap(0xFF33C000, 24772, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 704512) = 0xFF33C000
munmap(0xFF32C000, 65536)                       = 0
memcntl(0xFF280000, 113528, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
close(3)                                        = 0
stat("/usr/lib/libdl.so.1", 0xFFBEF4B8)         = 0
resolvepath("/usr/lib/libdl.so.1", "/usr/lib/libdl.so.1", 1023) = 19
open("/usr/lib/libdl.so.1", O_RDONLY)           = 3
mmap(0xFF390000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xFF390000
mmap(0x00000000, 8192, PROT_NONE, MAP_PRIVATE|MAP_NORESERVE|MAP_ANON, -1, 0) = 0xFF360000
mmap(0xFF360000, 2638, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xFF360000
close(3)                                        = 0
mmap(0x00000000, 8192, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANON, -1, 0) = 0xFF350000
stat("/usr/platform/SUNW,Ultra-80/lib/libc_psr.so.1", 0xFFBEF1D8) = 0
resolvepath("/usr/platform/SUNW,Ultra-80/lib/libc_psr.so.1", "/usr/platform/sun4u/lib/libc_psr.so.1", 1023) = 37
open("/usr/platform/SUNW,Ultra-80/lib/libc_psr.so.1", O_RDONLY) = 3
mmap(0xFF390000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xFF390000
mmap(0x00000000, 16384, PROT_NONE, MAP_PRIVATE|MAP_NORESERVE|MAP_ANON, -1, 0) = 0xFF270000
mmap(0xFF270000, 13800, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xFF270000
close(3)                                        = 0
munmap(0xFF390000, 8192)                        = 0
brk(0x00025F40)                                 = 0
brk(0x00027F40)                                 = 0
open("/etc/mnttab", O_RDONLY)                   = 3
fstat64(3, 0xFFBEF7E0)                          = 0
brk(0x00027F40)                                 = 0
brk(0x00029F40)                                 = 0
ioctl(3, TCGETA, 0xFFBEF76C)                    Err#25 ENOTTY
read(3, " / d e v / m d / d s k /".., 8192)     = 1482
ioctl(3, (('m'<<8)|1), 0xFF33EC30)              Err#25 ENOTTY
llseek(3, 0xFFFFFFFFFFFFFA90, SEEK_CUR)         = 90
close(3)                                        = 0
llseek(0, 0, SEEK_CUR)                          = 3166
_exit(0)

Do you have /etc/mnttab mounted?

mount -F mntfs mnttab /etc/mnttab

sar -v
(Have you exceeded maximum number of open files?)