HDTenEightyP/NetNews huggingface dataset:
From: wietse@wzv.win.tue.nl (Wietse Venema)
Newsgroups: comp.unix.wizards,comp.unix.programmer
Subject: Re: Recvfrom() in an inetd server
Date: 13 Aug 92 18:22:17 GMT
Followup-To: comp.unix.wizards
Organization: Eindhoven University of Technology, The Netherlands

A.Raman@massey.ac.nz (Anand) writes:

[getting the remote host name from an UDP connection in a child
process of the inetd]

>Regarding the second option of using recvfrom() on fd 0, I had the
>following doubt:  If inetd already receives the packet for us, and
>is known to supply the data field on stdin, then the packet is already
>lost.  In that case, how can recvfrom() return the packet to me?

inetd does not receive the packet. It just waits until a packet is
available, then invokes the daemon listed in the inetd.conf file. 

With the following code, inetd can non-destructively examine the
UDP packet, and find out the source IP address.

	/* In case of UDP, peek at the message without reading it. */

	if (recvfrom(0, buf, sizeof(buf), MSG_PEEK, &sa, &length) < 0) {
	    syslog(LOG_ERR, "recvfrom: %m");
	    ...
	}

	/* If all went well, sa.sin_addr is the source IP address. */

This trick is used in my tcp wrappers to find out what systems are
connecting to the telnet, finger, tftp and other services, and to do
access control as well. On some Convex systems the MSG_PEEK facility
does not seem to work, however.

	Wietse
From: dymm@cards.com (David Dymm)
Newsgroups: comp.unix.wizards
Subject: Restricted directory trees in Unix - how?
Date: 21 Aug 92 17:07:39 GMT

I would like to set up a restricted directory tree
on my Sun 4 system.  That is, certain users, when logging on,
would be placed into accounts that would be located in a
directory tree that would not have access to the rest of
the system directory structure.  Individuals who did not have
accounts in the restricted directory tree would be able to "see"
into the restricted tree, but users with accounts in the restricted
directory tree would not be able to "see" out.

My understanding is that I should probably use "chroot" from a
C program, which would be executed from the passwd file.
And the last thing the C program would do is a system call
to the Unix shell (csh).  And of course, the restricted directory
tree would have jto have its own bin, etc, and dev directories.

Any thoughts, comments, etc. that can be provided to help
me in this implementation would be greatly appreciated.

Thank you.


David Dymm - Principal Engineer

USMAIL: Electronic Warfare Associates
        1401 Country Club Road
        Fairmont, WV  26554
PHONE:  304 367-0770
FAX:    304 367-0775
INTERNET: dymm@cards.com
Newsgroups: comp.unix.wizards
From: kraghu@cs.tamu.edu (Kanakatte G Raghuram)
Subject: How to gain access to Physical memory?
Organization: Computer Science Department, Texas A&M University
Distribution: usa
Date: Wed, 12 Aug 1992 15:08:11 GMT


I need to create my own buffer in the physical memory. I intend to implement a
buffer mamager for a DBMS and I don't want my buffer to be a part of the logical
address space. I want my own buffer area in physical memory so that I have my
own buffer into which I can swap in and out the relations I need. I don't want
the O.S to interfere with my buffer area. Can such a thing be done and if so,
 how?




Newsgroups: comp.unix.wizards
From: mbeizer@gandalf.ca (Martin Beizer)
Subject: Lightweight Processes
Keywords: lightweight processes, I/O
Organization: Gandalf Data Ltd.
Distribution: na
Date: Fri, 14 Aug 1992 19:43:56 GMT

I would appreciate some help with a problem I'm having with lightweight
processes on a Sparc. (The description below neglects detail for the sake
of brevity.)

For simulation purposes I am porting a realtime kernel from 68K assembler
to C on the Sun, using lightweight process calls to save state during
context switches.

All "user" kernel tasks run at a single LWP priority level
(although with different priorities in the context of the ported
kernel).  This permits the translated algorithms to control which task
runs, rather than leaving it up to the lightweight process scheduler.

Context switching in the scheduler looks like:

	if (next_task != current_task)
	{
		lwp_resume(next_task->lwp_tid);
		lwp_suspend(last_task->lwp_tid);
	}

In order to simulate a timer interrupt, a higher lwp priority task
does essentially the following:

	while(1)
	{
		lwp_sleep(...)
		if interrupts_ok
			make_timer_task_ready_to_run
	}

This runs the scheduler, and when the interrupt process goes
back to sleep, causes a preemptive context switch to take place between
lower LWP level user tasks. (Note that the interrupt process is never
suspended.)

What happens is:

1. If output is redirected into a disk file, it works fine.

2. If output defaults to the terminal, it runs for awhile, until the
higher priority interrupt process eventually is the only lightweight
process left running.

It appears that I/O from the user proceses is distrubed by the
preemptive scheduling ONLY WHEN I/O GOES TO THE TERMINAL.

I've experimented quite a bit.  Any ideas?

----------------------------------------------------------------------
Martin Beizer			      Gandalf Systems, Cherry Hill, NJ
(609) 424-8700 X 5820 	       mbeizer@gandalf.ca, beizer@infotron.com
Newsgroups: comp.unix.wizards
From: oneill@cs.ulowell.edu (Brian 'Doc' O'Neill)
Subject: Re: Have $8000, what to buy?
Originator: oneill@bigmax.ulowell.edu
Organization: University of Massachusetts at Lowell Computer Science
Distribution: comp
Date: Mon, 17 Aug 1992 13:56:02 GMT


In article <1992Aug14.191324.13056@uwm.edu>, knie2586@csd4.csd.uwm.edu (Robert Joseph Knier) writes:
|> In article <MELLON.92Aug11123706@pepper.ncd.com> mellon@ncd.com (Ted Lemon) writes:
|> >The R4000 upgrade isn't available yet, to the best of my knowledge.
|> >I wouldn't count on being able to get it until it ships.   The
|> >graphics are okay, but don't get the standard DEC monitor - it's an
|> >utter piece of crap.   The good news is that I think it's VGA or SVGA
|> >compatible (maybe some DEC person can verify this?), so you should be
|> >able to get a good one that will work.
|> 	
|> 
|> 	I am not from DEC but the company I work for has R4000 and 
|> wanted to use the monitors for SVGA cards on PC's.  After calling
|> DEC, they told me they knew nothing at all about the monitors.  They
|> just bought them from Zenith (and would send them out for repairs).
|> So, I called Zenith and asked them the above question.  The answer
|> was that the horiztonal scan frequency was to high.  The people at
|> Zenith seemed to be surprized at the question and said it would
|> be quite difficult.
|> 

We have several MAXines here...the graphics systems are XGA compatible, IBM's
attempt at defining another graphics standard.

No, the R4000 is not available yet...no word on when, as field testing hasn't
begun...

=======================================================================
Brian O'Neill - Systems Manager, Computer Science 	 (508) 934-3645
University of Massachusetts at Lowell
Internet: oneill@ulowell.edu		Moderator, comp.binaries.ibm.pc
Newsgroups: comp.unix.wizards
From: bill@bilver.uucp (Bill Vermillion)
Subject: Re: Torek a hack? [Re: What must I learn...]
Organization: W. J. Vermillion - Winter Park, FL
Date: Thu, 13 Aug 1992 16:16:56 GMT

In article <avalon.713546720@coombs> avalon@coombs.anu.edu.au (Darren Reed) writes:

>For example, is having a long grey beard a requisite to being a true
>wizard ? :-)  Or not having to wear a suit and tie to work ?  Or not
>having to work 9am-5pm but any time you like ? :-)

Boy if that were true, I'd be one.  I fit all 3, plus others
that would fit, but I know I'll never be a wizard.  I know a
couple, and I'll probably never get that good.

-- 
Bill Vermillion - bill@bilver.oau.org  bill.vermillion@oau.org
                - bill@bilver.uucp 
                - ..!{peora|ge-dab|tous|tarpit}!bilver!bill
From: wayned.bbs@cybernet.cse.fau.edu
Newsgroups: comp.unix.wizards
Subject: Anybody have FTP source?
Date: 16 Aug 92 02:14:44 GMT
Article-I.D.: cybernet.0qukPB2w164w
Organization: Florida Atlantic University, Boca Raton

Hello unix wizards.  When I first saw the name of this forum, I knew I'd 
be posting in the correct place!

I recently purchased Coherent, which does not include FTP.  Does anybody 
know where I can find the source for FTP so I can port it?

Please, don't be offended by the signature, I gotta make a living too.

+-----------------------------------+-----------------------------------+
| Wayne Desmond                     | Happily using and working (read:  |
| OS/2 Consultant/Programmer        | earning a GOOD living) with       |
| (wayned.bbs@cybernet.cse.fau.edu) | OS/2, since version 1.1.          |
+-----------------------------------+-----------------------------------+
From: joseph@joebloe.maple-shade.nj.us (Joseph Nathan Hall)
Newsgroups: comp.unix.wizards
Subject: Fingering Coke Machines (was: Re: Torek a hack?)
Date: Wed, 12 Aug 92 12:45:01 EDT
Organization: 5 Sigma Software
Reply-To: joseph@joebloe.maple-shade.nj.us
X-Mailer: uAccess - Macintosh Release: 1.5v5


In article <avalon.713546720@coombs> (comp.unix.wizards), avalon@coombs.anu.edu.au (Darren Reed) writes:
) holland@dutiws.tudelft.nl (Gerhard den Hollander) writes:
) Dunno about coffee/cappucino, but coke definately :-)
) I remeber a post ages ago about a finger daemon hooked upto a coke
) machine so they knew how cold the coke was likely to be - not something
) for a unix rookie :)

Yeah, this was at CMU, the heavily-subsidized 25-cent machine (Cokes
in *bottles* --yeah!) outside the door of one of the larger terminal
facilities in the big ugly gray building.  (I didn't go there--just
visited occasionally.)  I forget the machine's "name."  This was
mucho years ago -- 7? -- when I first heard of it.  Then, of course,
there was that fine Air Force-sponsored bit of expert system silliness,
Rog-O-Matic.  But that's another story.

Hey, I wonder if the Diablos are still printing?  Only place I've
ever seen a live, working Xerox Altos.

(We now return you to your regularly scheduled discussion of UNIX 
hunks, er, hacks.  It must be a slow summer.)

uunet!joebloe!joseph   (609) 273-8200 day   joseph%joebloe@uunet.uu.net
v   v  sssss | Certified Guru: all-grain brewing,| 2102 Ryan's Run East
 v v  s   s  | C, synthesizer comp & arranging,  | Rt 38 & 41
  v    sss   | photography. Also not a bad cook. | Maple Shade NJ 08052
-----My employer isn't paying for this, and my opinions are my own-----
Newsgroups: comp.unix.wizards
From: jeff@dwerger.nshore.org (Jeffrey E. Finucane)
Subject: Restarting Xenix init (changing run levels)
Organization: Custom Tailored Systems, Inc.
Date: Tue, 18 Aug 1992 20:38:37 GMT
Summary: I cannot make init respawn its gettys after a SIGQUIT
Keywords: init SIGQUIT SIGINT SIGHUP signals

In article <1992Aug4.224529.12211@dwerger.nshore.org> I wrote of my problem.
No suitable solution has been found from the readers of comp.unix.xenix.sco
after two weeks.  If necessary I'll write an init.  Perhaps some kind
wizard could point out some "gotcha"'s.  Thanks.
Below is <1992Aug4.224529.12211@dwreger.nshore.org>.

>Xenix gurus:
>
>   I'd like to be able to bring a SCO Xenix system to a "single user" mode
>and back to a "multiple user" mode from a shell script or other program.
>The portion which is giving me fits is that of disallowing logins.  Ideally
>what I'd like to do would be to send the init process a SIGQUIT, kill the
>gettys and then inspire init to start spawning gettys again.
>
>   It seems that after init receives a SIGQUIT that the only way to force
>it to respawn gettys is to cycle it through the "single user" mode.  Is
>there another way?
>
>   I could do something along the lines of saving /etc/passwd, replacing
>/.profile (saving a copy), sending init a SIGHUP, and having the new
>/.profile restore /.profile and /etc/passwd from the saved copies.  This
>seems rather messy, however.  It would be nice if a receipt of SIGINT would
>cause init to start gettys and respawn, but alas, this seems not to be the
>case.
>
>   Is there another init I could plug into this system?
>
>   Jeff

-- 

Jeffrey E. Finucane                  INTERNET: jeff@dwerger.nshore.org
Custom Tailored Systems            UUCP: {uunet|backbone}!dwerger!jeff
Data Phone: (216) 935-2712  Telebit Trailblazer  Voice: (216) 935-0252
Xref: sparky comp.unix.wizards:3624 comp.unix.bsd:4191
From: catone@dmark.wharton.upenn.edu (Tony Catone)
Newsgroups: comp.unix.wizards,comp.unix.bsd
Subject: Re: Have $8000, what to buy?
Date: 15 Aug 92 14:53:17 GMT
Followup-To: comp.unix.wizards
Distribution: comp
Organization: University of Pennsylvania
In-reply-to: paigen@tfs.com's message of 11 Aug 92 16:49:28 GMT

In article <1992Aug11.164928.2658@tfs.com> paigen@tfs.com (David Paigen) writes:
   HP-UX is
   ok, although many people will turn their nose up at it.  How is the
   bang for the buck with HP?  (A good company, by the way).  Note that
   HP-UX is not BSD.

Bang for the buck with HP is great; the 9000/700s have the best
price/performance ratio of Unix workstations by far.  HP/UX isn't that
great; it is BSD on the inside but SYS V on the outside.  I'm not much
of a SYS V fan.  The good news is that you can build enough PD tools
to make the user and programming environment almost BSD.  Get lots of
RAM; HP/UX eats it up, and dies if you run out.  HP/UX can also be
killed by crashme, I'm told; I believe it, we've hung the whole
machine (730) once or twice just with big processes.  But that was
with the standard 16 meg RAM; we now have 32, I'd recommend more, but
then again we use it as a multiuser machine.

I like DEC Ultrix better than HP/UX, but since DEC keeps changing their
mind about Ultrix vs OSF/1, I'm not sure if I'd spend my money on DEC.
Never mind that according to the benchmarks we ran, the HP 9000/730 is
3 times faster than a DECStation 5000/200 across the board.

You can buy hot EISA 486-50 systems with fast SCSI 2 caching controllers
and disks for $4000-$6000.


- Tony
  catone@dmark.wharton.upenn.edu
From: ol@jet.riga.lv (Oleg Girko)
Newsgroups: comp.unix.wizards
Subject: Re: How to turn off termcap scrolling regions ("cs")
Date: 16 Aug 92 14:03:55 GMT
Organization: unknown
X-Newsreader: Tin 1.1 PL4

pds@lemming.webo.dg.com (Paul D. Smith) writes:

| I have a piece of code which uses termcap to set a scrolling region
| (if available, such as in vt100).  My problem is I can't find a
| portable way to *turn off* the region again.
| 
| Given tgetstr("cs", buf), on my OS tgoto(buf, -1, -1); seems to do the
| trick.  However, on another OS I know of -1,-1 doesn't work, but
| tgoto(buf, 0, 0) does: however 0,0 doesn't work on my system :(.

This seems to work properly:

       LINES = tgetnum ("li");
       ...
       tgoto (buf, 0, LINES-1)

Oleg Girko               _   ,
ol@infopro.spb.su      /  ) /
ol@jet.riga.lv        (_ / (__
Newsgroups: comp.unix.wizards
From: DGM%tifrvax.BITNET@pucc.princeton.edu (DARSHAN G. MAHARANA)
Newsgroups: comp.unix.wizards
Subject: Enquiry for E-macs GNU
Date: 20 Aug 92 10:41:33 GMT

Dear netter's
              I like to have info on getting public domain GNU E-macs
editing software source code for text editting under UNIX on 486 machine.
If source code is not available then executable file is also appreciated
to run on AT & T UNIX machine and 486/UNIX machine.
Any information or help is greatly appreciated.
    Thanks in advance.
                  Your's Unix-Wizard friend.
                   Darshan Maharana
                    E-mail: dgm@tifrvax.bitnet
Newsgroups: comp.unix.wizards
From: PCV1584@MVS.draper.com (Peter Vernam)
Subject: fuser(8) command does not work correctly on SunOS
Organization: Draper Laboratory
Date: Fri, 21 Aug 1992 23:50:00 GMT

I can't seem to get the SUNOS 4.1.{1,2} fuser(8) command to report on normal
files that are open by processes.  It does, however, report on files that are
current working directories (suffix c), and for executable files that are
being executed (suffix v).

When I use the fuser command on an IBM RS/6000 (running AIX 3.1.5), it
correctly reports on normal open files.

Does anyone have any idea why the Sun fuser command appears to be broken, or
what can do to make it behave correctly?

--
Peter Vernam                              Email: vernam@draper.com
Draper Laboratory, Inc.                   Voice: 617-258-2735
555 Technology Square                     Fax:   617-258-2705
Cambridge, MA 02139
Newsgroups: comp.unix.wizards
From: kibirev@csa.bu.edu (oleg kibirev)
Subject: Re: MP CPU-time phenomena
Organization: Computer Science Department, Boston University, Boston, MA, USA
Date: Sat, 15 Aug 1992 17:21:39 GMT
X-Posted-From: csa.bu.edu
X-Posted-Through: sol.ctr.columbia.edu

In article <1992Aug14.063450.25740@fcom.cc.utah.edu> terry@cs.weber.edu (A Wizard of Earth C) writes:
>In article <15250002@hprpcd.rose.hp.com> tmilner@hprpcd.rose.hp.com (Tom Milner) writes:
>>In comp.unix.wizards, boyd@prl.dec.com (Boyd Roberts) writes:
>>
>>|  In article <1992Aug6.214740.164@socrates.umd.edu>, steves@socrates.umd.edu (Steven Sonnenberg) writes:
>>|  > The cpu-bound application is:
>>|  > 
>>|  > 	while (1) i++;
>>|  > 
>>|  > I am measuring process CPU utilization based on u.u_utime + u.u_stime
>>|  > over the elapsed time (CPU seconds).  For example, in 10 seconds
>>|  > there are 20 seconds on CPU time (assuming 2 processors).
>>|  > 
>>|  And just how is your while loop going to run on both processors at the same time?
>>There's no reason that a processor switch could not occur anywhere in
>>the code... In a 10 second window, all processors could have a chance to
>>execute the code stream. 
>
>At the same time, or are you switching processors (ie: serializing)?  I suspect
>that even if you forced a processor switch, that's all it'd be.  I mean, you
>can't seriously be expecting i to increment n times as fast for n processors!
>
>What you need to do to force concurrent utilization is to take a concurrent
>benchmark and compile it with the right compiler (that knows about breaking
>concurrent code into multiple threads of execution) and then run it.  Even
>then, you probably aren't going to get aggregate CPU time, especially if you
>are runing an SMP'able kernel (it might be possible to get aggregate time if
>you are using an ASMP box and measuring using the master... but not likely).
>
>The only alternative to this might be to gather statistics in the scheduler...
>but then, of course, you have to subtract out your statistics gathering to
>be accurate, and then subtract out your subtract time, etc.
>
Hmmm, won't this work? 

while(fork()>0);
for(;;i++);

Oleg



Newsgroups: comp.unix.wizards
From: berry@socrates.umd.edu (Joseph Berry)
Subject: Re: MP CPU-time phenomena
Organization: University of Maryland University College
Date: Sun, 16 Aug 1992 04:23:52 GMT

>>>There's no reason that a processor switch could not occur anywhere in
>>>the code... In a 10 second window, all processors could have a chance to
>>>execute the code stream. 
>>

Let me try and clarify the original question better (I work with the
person who posted the question).  We have a monitoring tool (that's
what our company writes -- performance tools) that works on a couple of
different MP UNIX machines. We observed the following 'weird' phenomona:
while monitoring the CPU stats of a given process (the very simple CPU
loop example where there is nothing really to parallelize assuming the
compiler (standard UNIX SVR3 cc) can parallelize anything anyway, we
noted that during a 10 second window, this process frequently consumed
far more than 5 seconds worth of CPU time (sometimes as high as 8 sec). 
Most of the time, however, it was using just about 5 secs which is what
one would expect it to use (1/2 of 2 cpus).  Is there any way to explain
this phenomona?  This was observed on both SCO MPX and SUN's 600MP 
systems.

joe

+------------------------------------------------------------------------+
| Joe Berry                                                              |
| Strategic Software Group, Ltd., 3402 Shelburne Rd, Baltimore, MD 21208 |
| E-mail:  joe@ssgltd.com  or  uunet!ssgltd!joe                          |
| Phone:  410-764-5668;  Fax: 410-358-2106;  Pager: 410-796-6861         |
+------------------------------------------------------------------------+
t
From: bill@chaos.cs.umn.edu
Newsgroups: comp.unix.wizards
Subject: $500 to spend on service tools - Was Re: Have $8000, what to buy?
Date: 21 Aug 92 21:09:43 GMT


>While we are discussing what to get for $8000, I would like to get opinions
>about what are the better service tool kits around for about $500 to $600.
can i presume that you mean like screwdrivers, side cutters, etc? as in hardware?
well personnaly (as a hw design kinda guy, nowhere near even a wizardly dweeb)
id a kit which has the parts you like, then go purchase a zero hallberon case,
then fill it with the aforementiond parts, only manufactured by xcellite.
from what i've seen sold in kits most of it is pure d simple junk! priced
about 5 times what it goes for when sold in a convienience store. it's a nice
idea but the execution leaves a bit to be desired (as *they* say).
go find a decent tv repair shop, you know the kind where the last of the great 
gnurds works/ownes and as him either for an old catalog or the address of
where he buys his stuff 7 out of 10 times (yea i just made it up) he buys 
the good stuff and can point you the way to it. avoid hardware stores
they'll only be able to provide the most basic of items (always avoid the
chain store as they only provide the crap put out by fast buck japannese
and far east mom and pop shops. always avoid radio shack for the same reason).
you said you wanted the good stuff? well this is how ya get it. it ain't
cheep, but i am still using hand tools purchased in the very early '70's.
expensive? yes. are they lasting? what do you think. untill about 5 years ago
i *only* did hw. now i'm slowly evolving to only doing sw. i may rank as
a wizards apprentice helper 3rd class. (but i bet i can do 1 or 2 things with
the hw that a few of you don't know about :-)
oh yea why don't i do hw anymore? i got discusted wheb the bankers shut down
eta systems.
later.
bill pociengel
Newsgroups: comp.unix.wizards