HDTenEightyP/NetNews huggingface dataset:
From: nagappa@menudo.uh.edu (Chaitanya Nagappa)
Subject: Multiple listeners on same socket
Organization: University of Houston
Date: Wed, 22 Jul 1992 03:47:30 GMT

The following is posted for a friend of mine.
-C. Nagappa.

==============================================================================
Howdy all,
I need something equivalent to a socket, but that more than one process
can listen on. This is for multiple consumers, and the output from the
server can be picked up by any one of the consumers. In the simplest
scenario, I have two processes doing a "listen" on the same socket,
and only one of these process is trigerred to establish the circuit.
Yes, I know neither BSD sockets or TLI can do this. What is then the
alternative? Do I have to create my own virtual device?

Message queues & FIFOs are not a viable alternative, as the information
once placed cannot be easily retracted. For those of you who want the
details of what I am trying to do:
I have a machine that has a X.25 board on it. Unfortunately, the Co.
that wrote the drivers for incoming calls on it assumed that the call
can be handled on a one to one basis. I have 10 processes running with
each being able to handle about 12 calls. The processes are event driven
(using select). I thus need the process being spawned by the incoming
call to pass on its logical channel number to any one of my 10 processes.
The problem of statically placing this using standard IPC methods such as
message queues, FIFOs or shared memory is that by the time my processes
get around to receiving the info. (worst case scenario) the call might
have been cleared. So I need a phased communication of the info. I could
assign one port per consumer process, and have my incoming call contact
all of them, so that only the processes that are still consuming (not
reached the limit) can respond, and the first respondant gets the info.
However, this leads to a factorial number of attempts to calls established
(not efficient). I hope someone out there has a solution! If emailing to
this account, please mention my name and I will get a copy of it.

Thanks a lot,
--Ravi.
From: thomas@IRO.UMontreal.CA (Steve Thomas)
Newsgroups: comp.unix.internals
Subject: UNIX i/o
Summary: bad port
Keywords: implementation, pipes
Date: 21 Jul 92 15:33:14 GMT
Organization: Universite de Montreal

We are working with a port of SVR4 to a multiprocessor
machine. It appears that i/o transfers from devices
to memory are handled by a process (i/o daemon)
which employs pipes.

Needless to say this eats up about 66% of one cpu and
appears to be quite wasteful. Since I do not know 
much about UNIX internals, we would be most interested
in how i/o could best be done (i.e. in the kernel).

(Disclaimer: The manufactuer did the UNIX port and we
are simply trying to figure out how to fix this obvious
problem.)

thanks in advance 
Steve
--
internet: thomas@kovic.iro.umontreal.ca
From: lance@markv.com (Lance Ellinghouse)
Newsgroups: comp.unix.internals
Subject: STREAMS/Networking/Drivers
Date: 27 Jul 92 00:33:11 GMT
Organization: Mark V Systems Limited, Encino, Ca.

I am looking for reference materials or books that describe
how to create new protocol layers on top of STREAMS/IP layer
(similar to TCP and UDP).

I would like to create a new protocol layer that does RELIABLE
Datagram delivery... Unless someone already has this done (and 
I do not mean SUN ONC/RPC)... 

Thank you,
Lance Ellinghouse
lance@markv.com
Newsgroups: comp.unix.internals
From: witr@rwwa.COM (Robert Withrow)
Subject: Selection of PPA in DLPI attach.
Reply-To: witr@rwwa.com
Organization: R.W. Withrow Associates
Distribution: usa
Date: Thu, 23 Jul 1992 17:17:07 GMT

Is anyone aware of how the ``industry'' is selecting PPA numbers
to use in a DLPI attach request?

I understand that OSF is using a method that involves ``magic'' numbers,
and doen't seem to be extremely portable...???

-- 
---
 Robert Withrow, R.W. Withrow Associates, Swampscott MA 01907 USA
 Tel: +1 617 598 4480, Fax: +1 617 598 4430, Net: witr@rwwa.COM
Newsgroups: comp.unix.internals,comp.unix.wizards
From: casper@fwi.uva.nl (Casper H.S. Dik)
Subject: Re: Berkeley networking security
Organization: FWI, University of Amsterdam
Date: Thu, 23 Jul 1992 14:41:25 GMT

roehrich@cray.com (Dean Roehrich) writes:

>In article <1992Jul23.085632.17788@cl.cam.ac.uk> nmm@cl.cam.ac.uk (Nick Maclaren) writes:
>>A short while ago, someone mentioned a couple of preprocessors to rlogind
>>and so on, but I cannot find the article or remember their names.  Can some
>>kind person please remind me, so that I can FTP them?

>One package I use:

>	Subject:  v30i079:  log_tcp - TCP/IP daemon wrapper, Part01/02
>	Message-ID: <csm-v30i079=log_tcp.232607@sparky.IMD.Sterling.COM>

>	Posting-number: Volume 30, Issue 79
>	Archive-name: log_tcp/part01
>	Environment: UNIX
>	Supersedes: log_tcp: Volume 23, Issue 77

>This will log the machine and user name the connection is coming from.  Also
>has access controls.  It receives a pretty light load where I use it
>(roughly 1000 connections per month) but so far works fine.

Although tcp-wrapper makes logging of connections a lot easier, it
CANNOT present you with the name of the remote user in a rsh/rlogin
based connection. If it gives a username, it does so by using a remote
RFC 931 daemon. Since the not quoted part of the original post was:

>>What I need to do is to find out the userid a connexion was coming from
                                       ^^^^^^
>>(i.e. the one used for validation in .rhosts), so that I can report attempted
>>hack-ins to the other site in a useful fashion.  I would rather not have
>>to do this from scratch, because surely it must be a common requirement!

 I assume that the userid is also wanted. The only way to do that is
to hack rlogind/rshd to log the remote username. (That's what we've done)

You might be able to use MSG_PEEK on the tcp connection, but you'll
have to do that yourself.

Casper
-- 
						|	Casper H.S. Dik
						|	casper@fwi.uva.nl
Newsgroups: comp.unix.internals
From: nagappa@menudo.uh.edu (Chaitanya Nagappa)
Subject: Re: Multiple listeners on same socket
Organization: University of Houston
Date: Thu, 23 Jul 1992 14:02:02 GMT

The  following reply is again posted for a friend, viz, Ravi Ramachandran.
-C. Nagappa.
---------------------------------------------------------------------------

In article <1992Jul23.084108.22337@rdg.dec.com> jfoy@narcy.gao.dec.com (John Foy) writes:
>
>In article <1992Jul22.034730.12159@menudo.uh.edu>, nagappa@menudo.uh.edu writes:
>|>==============================================================================
>|>Howdy all,
>|>I need something equivalent to a socket, but that more than one process
>|>can listen on. This is for multiple consumers, and the output from the
>|>server can be picked up by any one of the consumers. In the simplest
>|>scenario, I have two processes doing a "listen" on the same socket,
>|>and only one of these process is trigerred to establish the circuit.
>|>[...]
>|>The problem of statically placing this using standard IPC methods such as
>|>message queues, FIFOs or shared memory is that by the time my processes
>|>get around to receiving the info. (worst case scenario) the call might
>|>have been cleared. So I need a phased communication of the info.
>
>I'm not sure what you mean by "phased communcation..."?
>
I need both sides to establish communication/ know it was established -
similar to that of a virtual circuit establishment (SYNC, ACK, etc.).

>I'm not entirely familiar with select etc... (being more of a VMS'r) but have
>you considered semaphores? e.g. the server pool waits on a counting semaphore
>which is incremented by the 'dispatching' process (I think you refer to this
>as the 'spawned' process)...? This way only available servers respond...
>
"select" enables the process to work wait for an event to occur on one of
multiple file descriptors - FIFOs, streams, etc. Unfortunately, not on
message queues, semaphores, or any other muliplexed listening posts.

From a fellow netter I had received a possible solution using signals.
Unfortunately, there is the problem that multiple signals, before processing
it, will be seen as a single signal. Another reply indicated that this
was a flaw with standard Unix implementation that device driver writers
had to deal with; unfortunately, the solution was propreitary.

>	jf
>
--Ravi.
From: bloomer@rodson.crd.ge.com (John Bloomer)
Newsgroups: comp.unix.internals
Subject: recv() vs. read() (and send() vs. write())
Keywords: socket buffering
Date: 21 Jul 92 21:31:33 GMT
Organization: GE Corporate R&D Center

If I interpret published unix internals books and manual pages
correctly, it is possible to peek at the data waiting at a socket -
using the MSG_PEEK flag.

While a read() will return with whatever it has found available at a
socket, does a recv() do the same, or does it peek to make sure the
whole len message is available?

I believe the same general question applies to send() vs. write().
Some guidance would be appreciated.
-- 
John J. Bloomer 518-387-6964 (dialcomm 833) FAX -7332
KWC317, General Electric Corporate Research and Development
PO Box 8, Schenectady NY 12301
From: limpe@sumax.seattleu.edu (Philipp Enrique Lim)
Newsgroups: comp.unix.wizards
Subject: Request for FAQ of this newsgroup
Date: 26 Jul 92 07:33:13 GMT
Distribution: usa
Organization: Seattle University, Seattle WA


May I kindly request a repost of comp.unix.wizards' FAQ, an ftp sight
where I may obtain one, or kindly e-mail me a copy.  

Thank you very much.

Philip
limpe@sumax.seattleu.edu
From: shah@optima.UUCP (Rawn Shah)
Newsgroups: comp.unix.wizards
Subject: Re: What must I learn to become a wizard?
Date: 31 Jul 92 04:31:56 GMT


    Learning to hook up a line to a telephone from your station and writing a 
driver for dialing the correct number and playing the right audio file for
ordering pizza from Dominoes with the order going to your present terminal
location.

...in an hour.
Newsgroups: comp.unix.wizards
From: hargrove@ramirez.mitre.org (Paul H. Hargrove)
Subject: What must I learn to become a wizard?
Originator: hargrove@ramirez
Organization: Mitre Corporation, McLean, VA
Date: Thu, 30 Jul 1992 17:56:19 GMT

I am wondering what you wizards think are the top, say 10 or so, topics or
concepts one must understand to be considered a wizard.  I guess there are
really a need for three lists, for 'programming', 'administration', and
'kernel' wizards.  Obviously some concepts may not apply to all of the
*nix platforms out there.

A couple items that come to mind to start the lists are:

'Programming' wizard:
sockets
rpc
shared memory
semaphores
signals (preferably all 3 environments: AT&T, BSD and POSIX)
STREAMS


'Administration' wizard:
process accounting configuration
termcap and/or terminfo entries
sendmail.cf (cries of pain errupt from the audience)
printer or batch queue configuration (very system dependent, I imagine)
crash recovery
NFS

'Kernel' wizard:
file systems, especially UFS and FFS (NFS doesn't count here)
virtual memory and paging/swapping
scheduling
device drivers (very system dependent, again)

I also imagine that a good knowledge of *nix history is important to help
create image of the 'wise old wizard.'

I'd be interested to hear what others think is of importance as well.
--------
Paul H. Hargrove, speaking for myself.
From: tchrist@convex.COM (Tom Christiansen)
Newsgroups: comp.unix.wizards
Subject: Re: sa -e ????
Date: 27 Jul 92 15:54:18 GMT
Reply-To: tchrist@convex.COM (Tom Christiansen)
Organization: CONVEX Realtime Development, Colorado Springs, CO
Originator: tchrist@pixel.convex.com
X-Disclaimer: This message was written by a user at CONVEX Computer
              Corp. The opinions expressed are those of the user and
              not necessarily those of CONVEX.

From the keyboard of cudcv@warwick.ac.uk (Rob McMahon):
:In article <1992Jul23.143726.12180@news.eng.convex.com> tchrist@convex.COM
:(Tom Christiansen) writes:
:>     e    Echo records exactly as they appear in the accounting file; this
:>          option may be used to convert the accounting file to ASCII text.
:
:Sounds useful, sounds like it only exists on the Convex.  SunOS 4.1.2 says
:
:cudcv (3495) > sa -e
:Invalid option e
:5.750u 12.030s 0:59.99 29.6% 0+139k 2+0io 2pf+0w
:Exit 1
:cudcv (3496) > 
:
:Note that it takes nearly 16 seconds process time to say that!

Given sys/acct.h, you could very easily write either a Perl or a C
program to emulate what my "sa -e" does.

--tom
-- 
    Tom Christiansen      tchrist@convex.com      convex!tchrist
    If you have ever seen the grim word "login:" on a screen, your mind
    is now a wholly-owned subsidiary of The Death Star.
                John Woods in <14105@ksr.com> of comp.unix.bsd
Newsgroups: comp.unix.wizards
From: le01437@portal.lasc.lockheed.com (WILSON, LOUIS C.)
Subject: Restarting Programs After a Shutdown
News-Software: VAX/VMS VNEWS 1.41    
Organization: Lockheed Aeronautical Systems Co. - Rye Canyon
Distribution: usa
Date: Wed, 29 Jul 92 02:11:10 GMT

       I am running long CPU intensive programs on a system that
must be shut down every evening. Is there a simple way (without 
adding to the existing code) to check-point these runs before
shutdown and re-start them when the system is back up. I have a
need to do this under SunOS 4.1.1 and HP/UX. I am aware of the
Condor project, but this seems to be much too complicated for
what I want to do.


       Thanks,
       		Louis Wilson
From: U433214%twncu865.BITNET@pucc.princeton.edu (Andrew Wang)
Newsgroups: comp.unix.wizards
Subject: how to unsubscript
Date: 22 Jul 92 17:27:59 GMT

hi all

I want to go on vacation so I need to sign off the unix-wizards.
How can I do that?

Thanx

Andrew
From: sweh@spuddy.uucp (Stephen Harris)
Newsgroups: comp.unix.wizards
Subject: Alternatives to ptys and fifos
Date: 26 Jul 92 19:52:19 GMT
Organization: Spuddy's Public Usenet Domain

Hiya all!
Basically, I am trying to write a daemon that alls a program such as lpd
write to a file, and the daemon takes the data and sends it to a host/port.
[In this case, the host/port is a terminal server with a printer attached].
That allows normal usaged of printcap etc.
The program is being written on SunOs 4.1.1

My problem is this:
If I use pty's, if the write end to the pty is closed, and the read end
(bah, master, slave, whatever!) hasn't read the whole pty buffer, then
SunOS cleans the buffer after a certain timeout.
I got this from one of the engineers at Sun UK.

Since I can't gaurantee the printer won't go offline, their could be a stage
when this happens.

OK, forget ptys, and use fifo pipe.  After all, I only need worry about
process->network, and not twoway comms :-).
Next problem: kernel is limited to 10 FIFO's open at once!  I don't want to
modify the kernel, because this program could endup running on machines I
don't have direct control over :-(

So....does anyone have any idea of a third alternative that provides a filename
the "cat" could write to, and a daemon read from?

Help please!  Your answers will be much appreciated!
-- 
                               Stephen Harris
               sweh@spuddy.uucp    ...!uknet!axion!spuddy!sweh

 * Meeeeow ! Call Spud the Cat on > +44 203 638780 < for free Usenet access *
Newsgroups: comp.unix.wizards
From: Tom Christiansen <tchrist@convex.COM>
Subject: Re: sa -e ????
Originator: tchrist@pixel.convex.com
Reply-To: tchrist@convex.COM (Tom Christiansen)
Organization: CONVEX Realtime Development, Colorado Springs, CO
Date: Thu, 23 Jul 1992 14:37:26 GMT
X-Disclaimer: This message was written by a user at CONVEX Computer
              Corp. The opinions expressed are those of the user and
              not necessarily those of CONVEX.

From the keyboard of bill@toby.transportation.state.mn.us (Hari Seldon psycohistorian):
:then Tom Christiansen <tchrist@convex.com> replied:
:>Use 'sa -e' and postprocess to your heart's content, probably using
:>awk or perl. (Translating group ids to names in awk is not a lot of
:>fun though.)
:
:so tom to reiterate rob, whats the e switch do? inquiring minds want to know.
:not that aix will do it but it's nice to know whats out there :-)

     e    Echo records exactly as they appear in the accounting
          file; this option may be used to convert the accounting
          file to ASCII text.  The fields are, in order:  command
          name, timestamp when execution started, total CPU time
          in seconds, TTY name, user ID, group ID, activity ID,
          elapsed time in seconds, CPU storage integral (kilo-
          core seconds), disk I/O blocks, system CPU time in
          seconds, the average level of concurrency (a floating
          point value between one and the number of processors in
          the system, indicating the average number of processors
          dedicated to the process at each clock interval; if
          this value is zero, then that particular accounting
          record was collected prior to CONVEX UNIX Release 7.0),
          and a character flag indicating in which scheduling
          mode the command was executed (f signifies that it ran
          as a fixed-schedule job at least part of the time; d
          represents a dynamic-schedule job (dynamic is the
          default scheduling mode)).  User CPU time may be com-
          puted by subtracting system CPU time from total CPU
          time.  See acct(5) for more information on the account-
          ing file.

--tom
-- 
    Tom Christiansen      tchrist@convex.com      convex!tchrist


	And on the seventh day, He exited from append mode.
From: bosscha@rc7.nhl.nl (Freerk J. Bosscha)
Newsgroups: comp.unix.wizards
Subject: process-usage after ctrl-alt-del
Date: 22 Jul 92 19:29:19 GMT

Hello,

Is there anywhone who could send me a possible solution off the following
problem.

We use MS-DOS pc's with kermit as terminal-emulater to login on an SCO-UNIX
box. 
There is no problem if the user normaly terminate a session. But if he, as
good old DOS user stops with <CTRL>-<ALT>-<DEL> the session still keep op
running and sometimes use cpu-time. If a process keeps on consuming cpu-time
it will NOT be killed after a certain idle time.
Does anywhone know a way such a user can be allocated and then killed.

-- 
******************************************************************************
* F.J. Bosscha                               * Phone      : xx-3158961435    *
* System administrator/-programmer           * Alt. Phone : xx-3158961444    *
* Faculteit Techniek,Economie & Management   * FAX        : xx-3158150125    *
* Noordelijke Hogeschool Leeuwarden          *                               *
* ---------------------------------------------------------------------------*
* email : bosscha@rc7.nhl.nl                                                 *
******************************************************************************
From: nivaldo@dcc.ufmg.br (Nivaldo de Oliveira Junior)
Newsgroups: comp.unix.wizards
Subject: Performance Measurement
Date: 31 Jul 92 19:13:05 GMT


I study Computer Science in UFMG, Brazil; and I am involved in a project for
analyzing the performance of a disk server in a Sun 4 Network, using the
SunOS 4.1. I haven't the system source.

Specifically my problem is to determine the clients of the server in a given
moment as well as the recquisitions of these clients (name of the program-
processes) who started the NFS request. I need to know too the kind of the
service used by each one.

If possible, the size of the queue of the NFS requests in the server.

I am looking forward to hearing from you soon.

Thanks

   Nivaldo de Oliveira Junior   
Newsgroups: comp.unix.wizards
From: ffeng@cs.tamu.edu (Fang Feng)
Subject: comp.unix.admin
Organization: Computer Science Department, Texas A&M University
Date: Thu, 30 Jul 1992 02:27:58 GMT


--
Texas A&M University             
Department of Computer Science  
(409)847-8609 (409)845-7147                  
internet: ffeng@cs.tamu.edu      
Newsgroups: comp.unix.wizards
From: kibirev@csa.bu.edu (oleg kibirev)
Subject: Detecting program input
Organization: Computer Science Department, Boston University, Boston, MA, USA
Originator: kibirev@csa
Date: Sun, 26 Jul 1992 00:39:56 GMT
X-Posted-From: csa.bu.edu
X-Posted-Through: sol.ctr.columbia.edu


I am writing a program that allows one to access their host through e-mail only.
One thing I need to do is determining when shell or it's child attached to the slave 
side of pty/tty pair has read everything written to tty and wants more input (ie is 
blocked in read call). Also, I need to know myself that all output of this process is
already delivered to me. The idea is that user passes a few commands to the session, gets
program's response for this command and then sends more input.

I can't figure out how to detect input on the other side of pseudo terminal. Since I have
no control over what program is executing here, I can't expect it's cooperation. Hope that
some wizard can e-mail or post the solution (or better way of doing the main job).

Oleg Kibirev
From: bzs@world.std.com (Barry Shein)
Newsgroups: comp.unix.wizards
Subject: Connecting machines from across the seas
Date: 24 Jul 92 23:41:42 GMT


From: mckeehan@math.utk.edu
>I have two Sun IPC's.  One in Kuwait and the other in Tennessee. (Please
>note, this is not some make believe setup, it actually exists).  I need
>to transfer some data files between the two machines...and I'd like to
>do it once a week.
       ^^^^^^^^^^^this is key to what I'll suggest...
>
>Due to security reasons, we prefer to not have these machines on any
>major network (i.e., internet).
>
>What is going to be the best (putting into consideration cost, time, and
>dependability) way to connect these two machines?

FedEx a floppy or tape or equivalent.

You could probably find someone in Kuwait who will courier it to the
airport in a US Fedex envelope (unsealed), put it on the next plane
going anywhere in the US, and have someone at the other end seal it
and drop it into a US Fedex box at that aiport for next-day delivery
(as a service, I'm not talking about bypassing customs or anything.)

With the right timing of flights and fedex box emptying you could
probably have it in about 24 hours for under $50. Call the local
airlines about how best to arrange something like this. You might be
able to arrange directly with fedex but int'l fedex often takes a few
days so you might need a more customized arrangement like I describe.

(Once, in an emergency, I bought a computer a seat on an airplane from
Boston to Miami, Ohio, and just had someone meet it at the other gate,
rather expensive, and I doubt they'll let you do that anymore, this
was pre-terrorist-paranoia, but boy it was satisfying, we were up and
running in about 4 hours.)
Newsgroups: comp.unix.wizards
From: camacs5@jhunix.hcf.jhu.edu (Sol Su)
Subject: a dbx internal error
Organization: HAC - Johns Hopkins University, Baltimore
Distribution: usa
Date: Sat, 25 Jul 1992 23:21:54 GMT

Reading symbolic information...
dbx: internal error: unexpected value 38 at line 2620 in file ../common/object.c

I ran into this on SunOS 4.1.1.   I do not have ../common from where i am
running dbx.  Any tips or pointers to more appropriate groups would
be appreciated.
From: zeno@hardy.u.washington.edu (Sean T. Lamont)
Newsgroups: comp.unix.wizards
Subject: How does getwd() work?
Date: 31 Jul 92 09:41:34 GMT
Organization: Abstract Software

I'm writing my own nfs server, and it's working fairly well, except for the
fact that "getwd" only works in the root directory of the nfs partition.
besides reporting it incorrectly as "/", subdirectories give me an error
when calling getwd.

Because of this I'm curious.  how does unix implement getwd?  What accounts
for various errors when calling getwd? (I'm getting "read error in ..", when
.. is perfectly readable.)

Thanks.  Please respond by email.





-- 
Sean T. Lamont, Abstract Software        |   "Don't oppress me, It's
zeno@u.washington.edu                    |    'computer of color!' "
Next Mail............................... |  yang.cpac.washington.edu!zebu!zeno 
----------------"My employers opinions are my own, not yours."-----------------