Commit Graph

17 Commits

Author SHA1 Message Date
Sami Kerola
ce61089059 docs: clarification to license headers in files
Add license header to all files.  The summary of licensing is below,
taken from Craig Small's email which is referred in commit message
tail.

sysctl and pgrep are GPL 2+
The rest is LGPL 2.1+

Reference: http://www.freelists.org/post/procps/Incorrect-FSF-address-in-the-license-files,8
Bug-Redhat: https://bugzilla.redhat.com/show_bug.cgi?id=797962
CC: Craig Small <csmall@enc.com.au>
CC: Jaromir Capik <jcapik@redhat.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-03-03 18:41:11 +11:00
Sami Kerola
6dd921ca1c slabtop: return failure if /proc/slabinfo cannot be accessed
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-03-03 18:36:29 +11:00
Sami Kerola
abd113313d slabtop: fix clang complier warnings
slabtop.c:273:29: warning: named variadic macros are a GNU extension [-pedantic,-Wvariadic-macros]

slabtop.c:299:9: warning: unused variable 'end' [-Wunused-variable]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-03-03 18:36:29 +11:00
Sami Kerola
bb142f7aa6 slabtop: total slabs & caches header fix
Commit 0ac63f5bc1 messed up header
print order; the Total Slabs and Total Caches where reported in place
of each other.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-01-06 16:10:09 +11:00
Craig Small
fb11e1fe0a Changed the err and warns to macros
err and warn are BSD format but they are not recommended by library
developers.  However their consiseness is useful!

The solution is to use some macros that create xerr etc which then
just map to the error() function.  The next problem is error() uses
program_invocation_name so we set this to program_invovation_short_name

This is a global set but seems to be the convention (or at least errors
are on the short name only) used everywhere else.
2012-01-03 18:48:43 +11:00
Sami Kerola
c3405fab1a translations: group usage texts
Reference: http://www.freelists.org/post/procps/backporting,5
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-01-02 16:29:03 +11:00
Craig Small
46e51c92e6 Fixed slabtop -o crash
printw should only be used for ncurses enabled screens, slabtop -o needs
to use the standard printf function, as before.
2011-12-22 23:53:17 +11:00
Sami Kerola
741de935ef slabtop: use strutils.c to validate user input
This commit fixes also peculiar behavior of

$ slabtop -d 0

which did not make sense. The fix is to disallow anything else but
positive integers, which includes zero as is is not positive (or
negative) number.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:30:54 +01:00
Sami Kerola
0022b6ec5d nls: improve translations and provide translator help comments
Reference: http://www.freelists.org/post/procps/backporting,1
Reported-by: Jim Warner <james.warner@comcast.net>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:30:54 +01:00
Jim Warner
0d27054a7b slabtop: added remaining missing nls support 2011-12-20 17:30:51 +01:00
Sami Kerola
0ac63f5bc1 slabtop: add gettext support
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:17:04 +01:00
Sami Kerola
61db37d48f slabtop: new usage & fix coding style
Coding style fixed and more readable help output.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:17:02 +01:00
Craig Small
0bee2f1060 slabtop prints plain ASCII in once mode
Using ncurses initscr/endwin clears the screen for xterm/etc it
now prints raw text using printf
Bug-Debian: http://bugs.debian.org/503089
Author: Craig Small <csmall@debian.org>
2011-12-02 22:36:38 +11:00
albert
1010c1d281 fix overflow on huge NUMA boxes 2005-01-05 21:46:22 +00:00
albert
10ac32d68e compile with glibc 2.2.17 and older 2005-01-05 20:50:54 +00:00
albert
a3dad291bb Fabian fixes slabtop; prep for 3.2.1 release 2004-03-27 04:30:05 +00:00
albert
efd8648fc7 add slabtop, fix top ^Z terminal handling 2004-01-24 22:33:56 +00:00