37

In the past, all of our servers have automatically shown command arguments passed to rake when we view them in top. For example:

enter image description here

But on this particular server, we get this instead (picture is top running, showing the rake command, but not showing any of the arguments that had been passed to rake):

enter image description here

Both servers are running Ubuntu (though the server without rake commands is a newer flavor of ubuntu). Both run rake through ruby enterprise edition (as powered by rvm). Can't seem to find any documentation on how top chooses what to show in the "command" column, other than the obvious "more data/less data" toggle (all screenshots are shown with the extra data enabled.

Anyone encountered anything similar to this?

2
  • I've ascertained that ps exhibits the same problem on this server as top. Neither will show arguments given to rake. The search for an explanation continues.
    – wbharding
    Commented Jan 14, 2013 at 19:02
  • 1
    I now understand the problem to be that /proc/[pid]/cmdline (which controls what is shown by top and ps) is not giving the same output on the two servers. I've posted an updated and more detailed question here serverfault.com/questions/478669/…
    – wbharding
    Commented Feb 14, 2013 at 22:25

2 Answers 2

53

Use top -c to make top show arguments. Alternatively, just press c in a running top to toogle this.

1
  • 1
    Sorry, I should have been more clear: the screenshots I showed were after toggling the output with "c". They still don't have the arguments for rake.
    – wbharding
    Commented Dec 11, 2012 at 17:52
1

Does the output of alias show an alias for top?

There is no environment variable that I know about that will change the default behavior of top, as VIRT and CPULOOP do not affect this.

What is the content of /etc/toprc? - that is a system wide configuration file (there also is a personal config file, but I doubt that you would not know about it)

I would suggest creating/changing /etc/toprc to get the output you want. And get rid of an alias if one exists.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .