from nscldaq.pidtocommand import pidToCommand
print('Init is run as:', ' '.join(nscldaq.pidToCommand(1)))
Given a valid process id (integer), returns the command line string that started that process. The command line is returned as an indexable iterable where each item is is a consecutive command word. If the pid is invalid, a KeyError is raised.
To support getting process command lines from remote systems (e.g. for the ringdiagnostics), this is also installed in $DAQBIN and, when invoked as a command, takes a single parameter, the process id, and outputs that PID's command line. The command line is output as a string.