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:

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


This module provides the following functions.

  • getitimer
  • setitimer
  • alarm
  • nanosleep
  • absolutesleep

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


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


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.


Returns current value of given itimer.


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