2

I use top in a perl script for storing information about the system in DB. The actual command is:

top -b -d1 -a all

However the COMMAND field seems to be 60 chars max and everything else is cut off. Is it possible to output full commands using top? I can't find any reference to this.

Eugene Yarmash
  • 2,433
  • 5
  • 34
  • 54

2 Answers2

2

The GNU version of top that I use doesn't have the same options as your BSD version, but perhaps this same technique will work for you:

COLUMNS=132 top -b -d1 -a all
Dennis Williamson
  • 62,149
  • 16
  • 116
  • 151
1

Because top doesn't provide this (no references), obviously you will need to use ps in your scripts.

HTH

Paul
  • 1,857
  • 1
  • 11
  • 15