I have an open solaris sun machine that encounters a zfs file system hang most of the time.
When we issue ZFS list , it hangs in there with no result. I have to execute "echo | format" or the "format" command to clear the hang.
I want to write a perl script that automates this every time the zfs filesystem hangs. The algorithm is below.
1. execute "zfs list | wc -l" and store the value in a scalar
2. check scalar is empty or not
3. if scalar value is empty, execute "echo | format " command
4. else exit
Want to set up this script as a crob job to run eveery minute