From mboxrd@z Thu Jan 1 00:00:00 1970 To: 9fans@cse.psu.edu Subject: Re: [9fans] equivalent of fstat | grep $portnumber ? From: "Russ Cox" Date: Tue, 19 Jun 2007 20:46:38 -0400 In-Reply-To: <568bd746aa51d85f82f65c08e17dbdc9@plan9.bell-labs.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Message-Id: <20070620004640.4A0111E8C4C@holo.morphisms.net> Topicbox-Message-UUID: 826821be-ead2-11e9-9d60-3106f5b1d025 > actually, seriously, i'd like a verison of ps in rc. > for the minimal boot fs on the compute nodes i have things like > fn cat { > sed '' $* > } > where's fn ps? apologies for continuing this awful discussion. i used to do this on the single-floppy boot image but i tired of making up clever things like that. the last time the single-floppy boot image filled i wrote a few programs to combine many binaries into a single one. this saves space because they all end up using the same instance of libc, libbio, etc instead of having multiple ones. this sort of thing is very common on unix for embedded systems. the binary looks at argv0 to figure out which main function to run. /sys/lib/dist/cmd/multi/mkfile takes care of combining a rather large number of binaries that the boot floppy needed. the final binary is 1300k compared with 4200k for the collection of the others. you can't mix in programs that use libthread. russ