[mod.unix] Unix Technical Digest V1 #35

Ron Heiby (The Moderator) <unix-request@cbosgd.UUCP> (03/26/85)

Unix Technical Digest       Tue, 26 Mar 85       Volume  1 : Issue  35

Today's Topics:
                    Adding up columns of numbers.
                group accounting on 4.2Bsd, possible?
           Limit to number of file structures... ? (2 msgs)
                    oldest surviving Unix machine?
                    wanted finer granularity sleep
----------------------------------------------------------------------

Date: 18 Mar 85 04:31:17 GMT
From: mark@tove.UUCP (Mark Weiser)
Subject: Adding up columns of numbers.

>P.S. One strange omission (to my knowledge) from all the UNIX tools
>is a program, similar in command syntax (groan, but probably needed)
>to 'sort' which adds up columns of numbers:
>
>	sumcol +4.6 foo
>
>Strange, must have been written hundreds of times.
>
>	-Barry Shein, Boston University

Awk is great for this.  Something like: awk '{sum += $4}\\
END {print sum}'
	-mark
-- 
Spoken: Mark Weiser 	ARPA:	mark@maryland	Phone: +1-301-454-7817
CSNet:	mark@umcp-cs 	UUCP:	{seismo,allegra}!umcp-cs!mark
USPS: Computer Science Dept., University of Maryland, College Park, MD 20742

[Ed note: YA example of the philosophy expounded by Kernighan & Pike. RWH.]

------------------------------

Date: 12 Mar 85 13:37:25 GMT
From: vidar@kvvax4.UUCP (Vidar S|rensen)
Subject: group accounting on 4.2Bsd, possible?

Has anybody any idea for how to account groups on 4.2Bsd
for login and cpu usage?? Today UNIX only supports individual
logins (/etc/sa, /etc/ac), but I want groups or projects.

Vidar Sorensen  ({decvax,philabs}!mcvax!kvport!kvvax4!vidar)
A/S Kongsberg Vaapenfabrikk, P.O.Box 25, N-3601 Kongsberg
	

------------------------------

Date: 27 Mar 85 05:57:36 GMT
From: JRBRINKEMA@USC-ISI.ARPA
Subject: Limit to number of file structures... ?

Is there a limit to the number of file structure that can be
defined for a single physical disk?  Under 4.2? 4.1? System V?

To put it another way, is 8 too many file structures for a disk?

tia.  John Brinkema

------------------------------

Date: 21 Mar 85 12:39:17 GMT
From: chris@umcp-cs.UUCP (Chris Torek)
Subject: Limit to number of file structures... ?

There is a hard coded limit on the number of *partitions* (usually 8,
/dev/foo0a through /dev/foo0h).  There's nothing that says you have to
make a file system use all of a partition, but you'd need a strange
driver (like Sun's network disk) that let you "indirect" into the
subpartitions.

In other words, suppose instead of using newfs or mkfs the way the
manual tells you, you do this:

First, figure out how much space you've got (let's say 400M).  Say
it's divided like this:

	a -  15M
	b -  15M
	c - 400M	(includes a, b, and g)
	g - 370M

Now suppose you make "a" a normal file system (for /) and "b" a normal
paging area.  Then instead of making "g" a 370M file system, you make
a file system at "g" that's only 185M.

Well, now there's 185M left at the end of the disk.  One problem remains:
you can't get to it.  (Well, strictly speaking, you can, by accessing
/dev/foo0g or /dev/rfoo0g and lseek()ing to 185M or more.)

Anyway, without some special hacks, that space is just gone.

If you don't have source, but are clever with adb, you can adjust the
sizes of your eight partitions however you like, but you're still stuck
with eight.  (Of course, with source, you can always go hack the driver
to support 16, or 75, or whatever you want.)

Also, you might note that there is a maximum number of mountable file
systems anyway (usually 15), so adding lots of partitions is probably
not a good idea anyway.
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 4251)
UUCP:	{seismo,allegra,brl-bmd}!umcp-cs!chris
CSNet:	chris@umcp-cs		ARPA:	chris@maryland

[Ed note: In some Unix systems, the number of mountable file systems is
a tunable parameter (e.g. AT&T 3B2 SVR2).  RWH.]

------------------------------

Date: 19 Mar 85 18:09:05 GMT
From: henry@utzoo.UUCP (Henry Spencer)
Subject: oldest surviving Unix machine?

Out of curiosity, I'm interested in locating the oldest Unix machine
that is still running Unix.  U of T's original 11/45 is idle right now
but will be running Unix again shortly; this sets a "latest bound" on
the oldest machine, since our 45 appears to have been running Unix late
in 1974.  This was one of the first 20 or so licensed Unixes outside Bell.
An older machine would have to be either inside Bell, or one of those
early few.

If the oldest machine turns out to be within Bell, I'm also interested
in the oldest non-Bell Unix machine.

Whatever machine is the oldest, it's not at the Murray Hill research
lab.  I've already asked Dennis about this; nothing in his vicinity
is particularly old.

Since PDP-7 Unix can safely be assumed to be dead, the oldest Unix
machine will have to be an 11.  Specifically, it will have to be a
45, a 40, or just possibly a 20, since our 45 pre-dates the official
announcement of the 70.

Please reply to me by mail; I will post the results.
-- 
				Henry Spencer @ U of Toronto Zoology
				{allegra,ihnp4,linus,decvax}!utzoo!henry

------------------------------

Date: 15 Mar 85 17:19:25 GMT
From: davidt@ttidca.UUCP (David Terlinden)
Subject: wanted finer granularity sleep

I am interested in implementing a sleep function with a finer granularity
than 1 sec.  Has anyone does this?  Any comments? (Assume v.7 UNIX.)
D. Terlinden, TTI, 3100 Ocean Park V3, Santa Monica 90405, (213)450-9111,x3124

------------------------------

End of Unix Technical Digest
******************************
-- 
Ronald W. Heiby / ihnp4!{wnuxa!heiby|wnuxb!netnews}
AT&T Information Systems, Inc.
Lisle, IL  (CU-D21)