Link to home
Start Free TrialLog in
Avatar of molmstead
molmstead

asked on

df command not working

We have installed fileutils-3.16-9 but the df -k command gives tons of error messages like:
Filesystem         1024-blocks  Used Available Capacity Mounted on
df: module: No such file or directory
df: kerneld,: No such file or directory
df: filesystems.: No such file or directory
df: clean,: No such file or directory

etc.
Since we use df -k to monitor the file system's capacity, we really need this command to work properly.
Please help.

We are running Linux 2.0.33 on a Sparc 10
Thanks.                                          
Avatar of kiffney
kiffney

Perhaps you don't have an /etc/mtab file?  Or it has been deleted by mistake?  I think df reads this to find out what's mounted.  Check to see if it's there.  If not, re-create it (man fstab will help).  If it is there, and not empty, try running

strace -o df.errors df

and post the output of df.errors.  The df.errors file will help you see what system calls are being made and what is going wrong.
Avatar of molmstead

ASKER

I don't have the strace command. Where do I get it?

I do have an /etc/mtab file, and it looks like this:

Finding module dependencies... done
Starting kerneld, version 2.1.85 (pid 38)
Checking filesystems.
/dev/sda5: clean, 845/51200 files, 18004/204624 blocks
/dev/sda7: clean, 4569/197880 files, 84171/790308 blocks
/dev/sda4: clean, 19158/204800 files, 283972/819018 blocks
/dev/sda6: clean, 178/25584 files, 8705/102312 blocks
Parallelizing fsck version 1.10 (24-Apr-97)
Checking all file systems.
----------------------------------
----------------------------------
[/sbin/fsck.ext2] fsck.ext2 -a /dev/sda5
[/sbin/fsck.ext2] fsck.ext2 -a /dev/sda7
[/sbin/fsck.ext2] fsck.ext2 -a /dev/sda4
[/sbin/fsck.ext2] fsck.ext2 -a /dev/sda6
----------------------------------
Mounting local filesystems.
Turning on user and group quotas for local filesystems
Setting clock (utc): Tue Dec 28 21:08:28 UTC 1999
Enabling swap space.
Initializing random number generator...

Thanks for any help you can provide.
ASKER CERTIFIED SOLUTION
Avatar of Reinier
Reinier

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I think he's Molmstead is giving the right file which has wrong contents for some reason. Since 'df' is looking at /etc/mtab and get really surprised by the contents, as resulted in the error he posted.
You sir have greatly helped us.
I read the mount man page, and created a symbolic link from the /proc/mounts to the mtab file and now the df -k command works perfectly.
Thanks for your wonderful help.
;-)MO