Skip to main content
Help improve PyPI by participating in a 5-minute user interface survey!

Application which scans a list of given pids and determines the executing user

Project Description

An application which scans a list of given pids and determines the executing user.

Each line on stdout contains the result, either a username or a uid (if –uid is specified, or a username cannot be determined from a uid), or “unknown” on complete failure (like invalid PID).

Error messages are on the same line, but in stderr, such that any script can use the stdout result and simply check for “unknown” instead of needing to parse the errors.


Usage: findProcessOwner (options) [pid1] (optional: pid2, pid3)

Prints the owner (account running) processes, given their pids. They are returned one per line on stdout.

Any errors reported go to stderr. If no owner can be determined, stdout will contain “unknown” for that line.

Thus your program can always ensure parsable output by parsing stdout, one-entry per line, and checking for “unknown”.

If a username can not be determined (like user deleted, or uid changed, etc) a pid will be printed.


–uid Print the UID instead of the username

–version Print the version


findProcessOwner 1234

findProcessOwner –uid 1234 3231


Returns zero if all searches were successful, otherwise non-zero.


Current shell user:

$] findProcessOwner $$


Three processes, two invalid:

$] findProcessOwner 12345 $$ 12233

unknown (Could not determine owner of pid 12345)


unknown (Could not determine owner of pid 12233)

Three processes, two invalid, stderr nullified:

$] findProcessOwner 12345 $$ 12233 2>/dev/null




Release history Release notifications

This version
History Node


History Node


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
findProcessOwner-1.0.1.tar.gz (10.1 kB) Copy SHA256 hash SHA256 Source None Oct 19, 2015

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page