Pycopia utils package

This package collects the compiled (C) modules and utilities. A set of SUID helpers is installed that allow non-root users to perform certain tasks that usually require root priviledges.

These are:

pyntping
Allows opening ICMP sockets for sending pings from the pycopia.ping module.
slogsink
Open an syslog socket and proxy it to a user accessible unix socket.
straps
Open and SNMP trap port and proxy it to a user accessible Unix socket.
daemonize
Perform system calls to make any process a daemon process (service that runs in background).

Itimer

This module provides the following functions.

  • getitimer
  • setitimer
  • alarm
  • nanosleep
  • absolutesleep

These provide low-level timing functions that are interruptable and resumable.

pycopia.itimer.absolutesleep()

Sleep for <delay> seconds, with nanosecond precision. Signal handlers are run while sleeping.

pycopia.itimer.alarm()

Arrange for SIGALRM to arrive after the given number of seconds. The argument may be floating point number for subsecond precision. Returns the original value of the timer.

pycopia.itimer.getitimer(which)

Returns current value of given itimer.

pycopia.itimer.nanosleep()

Sleep for <delay> seconds, with nanosecond precision. Unlike time.sleep(), signal handlers are run during this sleep.

pycopia.itimer.setitimer(which, delay, interval)

Sets the given itimer to fire after value delay and after that every interval seconds. Interval can be omitted. Clear by setting seconds to zero. Returns old values as a tuple: (delay, interval).

Table Of Contents

Previous topic

Pycopia Python aid package

Next topic

Pycopia core package