[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Sheflug] Process locking



> One amateur radio packet program works OK, so I assume that my AX25 is set
up
> correctly. This program is only for sending and receiving packet; it does
not
> monitor the traffic when not connected. It uses a separate program for
> monitoring, which doesn't work, but gives me an error message: ax25spyd
not
> found on port 14090. I can't find anything obvious and have no idea what
port
> 14090 is.

The "port", or "endpoint", is just a number that services can 'attach' to.
This is so that you can have more than one network-aware server running on
any one machine: for example, packets going to a webserver can be
differentiated to those bound for a mail server because the port numbers are
different. ax25spyd not found, that means that it isn't running. If you log
in and run 'ax25spyd', that ought to sort the problem out. If you get a
'Command not found', it probably isn't installed.

> Yet another monitoring program called "Listen", works when run in ROOT,
but
> when run logged in as myself doesn't work but gives the error "socket:
> Operation not permitted". I have looked at the "Listen" permissions and
they
> seem OK. Doing a LOCATE shows many sockets and I don't know which to look
at
> for possible wrong permissions.

"Operation not permitted" - most likely, this is because you need to be root
to run a socket in 'promiscous' mode. Long story, but the short answer is
that 'Listen' needs to be run as root. There are several ways of doing this.
Either, do a "chmod a+x `which listen`" (a bit of a dirty hack), or setup up
a program called 'sudo' on your machine. As root, you can configure 'sudo'
to allow certain users to run certain programs with root's permissions. This
would take a bit longer to sort out, but it is ultimately the better
solution really.

> Finally, the TNT program. When run as ROOT from the KDE shell (which is
the
> only way I have found of starting it), I get a screen full of text about
the
> program. This screen just says up and the only way I can get rid of it is
by exiting
> the shell and typing "tnt" again. This then gives the
> "Device /dev/ttyS0 is locked by process 822. (Different numbers each time)
>
> Doing a lsof /dev/ttyS0 gives the following:
>
> COMMAND  PID   USER  FD  TYPE  DEVICE  SIZE       NODE NAME
>   tnt             822    root    3u    CHR   4,64      736729
/dev/ttyS0
>
> I kill the PID and type tnt. This time, no text screen, just the process
error
> giving a different number.

Sounds like tnt is respawning - i.e.,  you're not running the program
properly. I don't know tnt personally, so it could be that it isn't an
interactive program (i.e., it doesn't take user input)? There are a number
of things to try. Firstly, the 'kill 822' only does a semi-nice kill - I
would guess that a 'killall -9 tnt' would get you back to the initial 'text
screen' stage.

So, how should you run it? Well, depends. Firstly, having something hogging
a console is not necessarily bad, although obviously it could be annoying.
I'm not really sure how you intend to use this program (does it provide a
network service? is it supposed to run in the background? etc.), so this may
be completely wrong, but I would imagine doing a 'tnt &' would be what you
want.

Cheers,

Alex.

PS. Just come back from York to London via GNER. FIVE HOURS... (usually
takes two..)

---------------------------------------------------------------------
Sheffield Linux User's Group - http://www.sheflug.co.uk
To unsubscribe from this list send mail to
- <sheflug-request [at] vuw.ac.nz> - with the word 
 "unsubscribe" in the body of the message. 

  GNU the choice of a complete generation.