The procedure I use is:
sudo apt-get install htop apt-file
sudo apt-file update
htop
f2 for setup
Navigate with the arrow keys Down Arrow,Right Arrow,Space to toggle tree view, Esc to get back to menu(because you can't send F10 to the gnome-terminal easily). You can also do this with the mouse.
Now you get more informative information about exactly how each process is launched and other files it might load. So oneconf-service for example.
man oneconf-service
and man oneconf
yield nothing. apt-cache search oneconf-service
yields nothing.
apt-file search oneconf-service
yields oneconf: /usr/share/oneconf/oneconf-service
apt-cache search oneconf
yields oneconf - synchronize your configuration data over the network
To go back to your particular ones in question:
for apt-file search gvfs-gphoto2-volume-monitor
you get:
gvfs-backends: /usr/lib/gvfs/gvfs-gphoto2-volume-monitor
gvfs-dbg: /usr/lib/debug/usr/lib/gvfs/gvfs-gphoto2-volume-monitor
And apt-cache search gvfs-backends
yields:
gvfs-backends - userspace virtual filesystem - backends
apt-file search 'rtkit-daemon'
yields:
rtkit: /lib/systemd/system/rtkit-daemon.service
rtkit: /usr/lib/rtkit/rtkit-daemon
apt-cache search rtkit
yields:
rtkit - Realtime Policy and Watchdog Daemon
Edit to address comment:
I recommend htop because you can see other loaded modules not just the process name. If something launches in a funny way, the output of ps/process name may not show you something horribly useful.
Apt-file can find things that are named differently than the package name and aren't in the package description. It lets you track any file installed by a package back to the package.
userspace
users can control it virtual filesystem
not exactly a filesystem, but it acts like one - backends
the part you don't see. If you check in htop, it talks over dbus(it shows in loaded modules). This makes me think it lets users manipulate filesystems/mounts/devices over dbus (a common way to grant super-user privileges without requiring sudo and using package-kit instead). So when you combine htop output, knowing a common use for dbus, and the description, it becomes a lot more clear.
Watchdog
a process that monitors another to make sure it doesn't run out of control daemon
something that runs as a service. So it's a process that monitors other processes to make sure scheduling doesn't get out of control.
You can use the exec
shell builtin:
bash -c "exec -a MyUniqueProcessName <command> &"
<command>
replaces the current shell, no new process is created, that's why I'm starting a new shell to call exec
.
Then you can kill the process with:
pkill -f MyUniqueProcessName
You can start more than one process under the same name, then pkill -f <name>
will kill all of them.
Best Answer
Try this:
for listing commands of processes with an interruptable and uninterruptable sleep state.
ps
outputting only state and commands of all processes (ax
) andh
removes the header line.grep
filters processes other than the two sleep statescut
is used to remove the state output again.command
withucmd
if you don't need the full name including all arguments.This is probably suboptimal scripting here, but I couldn't find a quick way to have
ps
filtered for a specific state.