A user reported he could not execute the top command.
I accessed his system and found top worked. However, if I used to the su command to become the user, top would fail with a segmentation fault. To add to the oddness was a strange message: Cannot get binary type. Odd messages such as this can fill a person with dread as it could mean somebody messed up their profile. A debugging task that is rarely fun or rewarding.
I checked the PATH and found it was in order.
For fun; I reloaded procps.
I even checked security settings.
Still the segmentation faults continued.
At this point; I asked a few people and checked the Net and didn’t get any obvious answers.
I tried another system with the users account and though it pulled an error at login, it did run top.
What could be wrong? Do I need to reload the system?
I checked the users profile and didn’t see anything obvious. I happened to run ls -la and one thing did catch my attention. There was a file called .toprc. I renamed it and top worked!
It turns out you can have an RC file for top. I didn’t know that as my need for top is usually the load on the system…..