[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Using Debian's kernels to process profiling



On Debian etch,
I am using all the options of the 'time' command to get a profiling of
a process. However I have noted that the memory profiling gets always
zero as result!

    0 Average total (data+stack+text) memory use of the process, in Kilobytes.
    0 Maximum resident set size of the process during its lifetime, in
Kilobytes.
    ...
    0 Average amount of shared text in the process, in Kilobytes.


Must I configure a specific kernel parameter to allow memory profiling?

I am using the below kernel on Debian etch:
  Linux version 2.6.18-4-k7 (Debian 2.6.18.dfsg.1-12etch2) (dannf@debian.org)
  (gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21))
  #1 SMP Wed May 9 23:42:01 UTC 2007


That is the command and output I get:

/usr/bin/time --format=" %C Name and command line arguments of the
command being timed.\n %D Average size of the process's unshared data
area, in Kilobytes.\n %E Elapsed real (wall clock) time used by the
process, in [hours:]minutes:seconds.\n %F Number  of  major,  or
I/O-requiring, page faults that occurred while the process was
running.  These are faults where the page has actually migrated out of
primary memory.\n %I Number of file system inputs by the process.\n %K
Average total (data+stack+text) memory use of the process, in
Kilobytes.\n %M Maximum resident set size of the process during its
lifetime, in Kilobytes.\n %O Number of file system outputs by the
process.\n %P Percentage of the CPU that this job got.  This is just
user + system times divided by the total running time. It also prints
a per‐ centage sign.\n %R Number  of  minor,  or  recoverable,  page
faults.  These are pages that are not valid (so they fault) but which
have not yet been claimed by other virtual pages.  Thus the data in
the page is still valid but the system tables must be updated.\n %S
Total number of CPU-seconds used by the system on behalf of the
process (in kernel mode), in seconds.\n %U Total number of CPU-seconds
that the process used directly (in user mode), in seconds.\n %W Number
of times the process was swapped out of main memory.\n %X Average
amount of shared text in the process, in Kilobytes.\n %Z System's page
size, in bytes.  This is a per-system constant, but varies between
systems.\n %c Number of times the process was context-switched
involuntarily (because the time slice expired).\n %e Elapsed real
(wall clock) time used by the process, in seconds.\n %k Number of
signals delivered to the process.\n %p Average unshared stack size of
the process, in Kilobytes.\n %r Number of socket messages received by
the process.\n %s Number of socket messages sent by the process.\n %t
Average resident set size of the process, in Kilobytes.\n %w Number of
times that the program was context-switched voluntarily, for instance
while waiting for an I/O operation to complete.\n %x Exit status of
the command.\n"  sqlite3 db_charts < test__select_update_insert.sql >
/dev/null

 sqlite3 db_charts Name and command line arguments of the command being timed.
 0 Average size of the process's unshared data area, in Kilobytes.
 39:05.23 Elapsed real (wall clock) time used by the process, in
[hours:]minutes:seconds.
 0 Number  of  major,  or I/O-requiring, page faults that occurred
while the process was running.  These are faults where the page has
actually migrated out of primary memory.
 0 Number of file system inputs by the process.
 0 Average total (data+stack+text) memory use of the process, in Kilobytes.
 0 Maximum resident set size of the process during its lifetime, in Kilobytes.
 0 Number of file system outputs by the process.
 22% Percentage of the CPU that this job got.  This is just user +
system times divided by the total running time. It also prints a per‐
centage sign.
 279254 Number  of  minor,  or  recoverable,  page  faults.  These are
pages that are not valid (so they fault) but which have not yet been
claimed by other virtual pages.  Thus the data in the page is still
valid but the system tables must be updated.
 71.56 Total number of CPU-seconds used by the system on behalf of the
process (in kernel mode), in seconds.
 467.20 Total number of CPU-seconds that the process used directly (in
user mode), in seconds.
 0 Number of times the process was swapped out of main memory.
 0 Average amount of shared text in the process, in Kilobytes.
 4096 System's page size, in bytes.  This is a per-system constant,
but varies between systems.
 8225 Number of times the process was context-switched involuntarily
(because the time slice expired).
 2345.23 Elapsed real (wall clock) time used by the process, in seconds.
 0 Number of signals delivered to the process.
 0 Average unshared stack size of the process, in Kilobytes.
 0 Number of socket messages received by the process.
 0 Number of socket messages sent by the process.
 0 Average resident set size of the process, in Kilobytes.
 218050 Number of times that the program was context-switched
voluntarily, for instance while waiting for an I/O operation to
complete.
 0 Exit status of the command.

Best regards,
David


Reply to: