Reputation: 87
I have recently been having problems running df -h
, where it just hangs?
I tried running dmesg
and getting the following snipped output:
[163075.079660] nfs: server 10.52.88.225 not responding, timed out
[163255.559732] nfs: server 10.52.88.225 not responding, timed out
[163255.559746] nfs: server 10.52.88.225 not responding, timed out
[163436.039699] nfs: server 10.52.88.225 not responding, still trying
[181222.119076] Key type cifs.spnego registered
[181222.119084] Key type cifs.idmap registered
[3350628.620368] hrtimer: interrupt took 10952185 ns
And when I pinged 10.52.88.225
, it is throwing "Destination Host Unreachable".
So what I am trying to achieve is giving df may be only 10 seconds and if it does not respond, then terminate and process the next one in the list. Any script can be made to do this?
Any response/feedback will be much appreciated.
Upvotes: 1
Views: 557
Reputation: 1996
Try this one:
timeout [options] 10s <command> [args]
Update:
If you need to control/abort a stalled df
and see output for other mounts, you may need to run 1 "df" for each mount; to keep things simple, maybe a shell script similar to this:
Upvotes: 1