ngetty - other programs

On my boxes I build ngetty with:
	make CC='diet -Os gcc -W'
	rm ngetty
	make CC='diet -Os gcc -W' LDFLAGS='-s -Wl,-N'
	make ngetty.i386       # on i386 hosts
It uses then only two pages memory; one for text + data and one for stack.
riemann$  size /sbin/ngetty
   text    data     bss     dec     hex filename
   1072       0      24    1096     448 /sbin/ngetty

ngetty-helper.tiny

This is the same as ngetty-helper. It does not support only escapes \d \t \U \u.
You can make it default with:
	cd /sbin
	cp ngetty-helper  ngetty-helper.large
	install ngetty-helper.tiny  ngetty-helper
	ls -la ngetty*

dumputmp

This program dumps a file in human readable format on stdout. Examples:
	dumputmp /var/run/utmp
	dumputmp /var/log/wtmp
WARNING: There is a program utmpdump in sysvinit package. My used different name to avoid conflicts.

nwho

This is my who. Try
	who
	nwho -a
	nwho -aq
	nwho -a  /var/log/wtmp
	nwho -aq /var/log/wtmp
WARNING: I wrote nwho from scratch. May be its options are deffernt from the options of the standard who.

cleanutmp

This program clean the file /var/run/utmp. If last file contains an utmp-record (type USER_PROCESS) and there isn't a program on the box with the same PID as in the record, then cleanutmp changes the record to DEAD_PROCESS.

cleanutmp permition

If your /var/run/utmp file has permition
  -rw-rw-r--   root   utmp   4224 Dec 19 08:53 /var/run/utmp
install cleanutmp with the same UID:GID and mode 2711. Then every user can execute cleanutmp before who, finger... Cron daemon can also start cleanutmp on every six hours.

On my box I can make/test bad utmp-entries with:

	xterm &
	kill -9 %1
	sleep 1
	--- see the result ---
	dumputmp /var/run/utmp
	cleanutmp
	dumputmp /var/run/utmp
Try to start who, finger before/after cleanutmp to see the difference.

Last modified: 25 May 2008