ps and username size
Denys Vlasenko
vda.linux at googlemail.com
Sun Jan 6 03:24:27 UTC 2008
On Saturday 05 January 2008 21:00, Cristian Ionescu-Idbohrn wrote:
> Noticed that several usernames on my debian sid box are longer than 8
> bytes:
>
> ,----
> | Debian-exim:x:102:102::/var/spool/exim4:/bin/false
> | messagebus:x:103:104::/var/run/dbus:/bin/false
> | fetchmail:x:107:65534::/var/lib/fetchmail:/bin/sh
> | debarchiver:x:109:109:Deb archiving tool,,,:/var/lib/debarchiver:/bin/false
> | smokeping:x:127:127:SmokePing daemon,,,:/var/lib/smokeping:/bin/false
> | haldaemon:x:132:124:Hardware abstraction layer,,,:/home/haldaemon:/bin/false
> | email-reminder:x:1002:1003:Email-reminder mailer,,,:/var/spool/email-reminder:/bin/bash
> `----
>
> ps from procps-3.2.7-5 shows such users using the uid instead of username:
>
> ,----
> | 103 4469 0.0 0.0 2764 888 ? Ss 15:52 0:00 /usr/bin/dbus-d
> | 127 4969 0.0 0.3 15468 12364 ? Ss 15:52 0:00 /usr/sbin/smoke
> | 132 5241 0.0 0.1 5284 3352 ? Ss 15:52 0:00 /usr/sbin/hald
> | 132 5273 0.0 0.0 2224 908 ? S 15:52 0:00 hald-addon-acpi
> | 127 27372 0.0 0.0 2692 920 ? S 21:28 0:00 /usr/bin/fping
> `----
>
> bb-ps shifts 'VSZ STAT COMMAND' a few columns, adjusting to the username
> string size:
>
> ,----
> | 4469 messagebus 2764 S /usr/bin/dbus-daemon --system
> | 4969 smokeping 15468 S /usr/sbin/smokeping [FPing]
> | 5241 haldaemon 5284 S /usr/sbin/hald
> | 5265 root 3248 S hald-addon-input: Listening on /dev/input/event4 /dev
> | 5273 haldaemon 2224 S hald-addon-acpi: listening on acpid socket /var/run/
> `----
Thanks for the report. Using %-8.8s instead of %-8s fixes this.
I am also fixing VSZ overflow with large VSZs.
Will commit changes to svn in a minute.
--
vda
More information about the busybox
mailing list