Score:0

Purged package still choking the system

in flag

Some days ago I booted my dual-boot machine in Windows and, with my surprise, the fan was quieter.

Back to Linux I started investing what is going one, and it went out that was a process hogging all the CPUs' forces: Screenshot of the shell running top

The process was named postgres

I killed that process with sudo kill 6509

The fan slowed down and I thought that all was done.

But the next day the fan was noisy again. top showed that a process named postgres, was still there (different pid).

So

  1. I killed the process;
  2. purged postgresql: sudo apt purge postgres*. After that I reboot but a process named postgres using a lot of CPU was there.

I think it can't be something postgresql's related.

How can I remove it?

Paul avatar
us flag
What is the output of `apt list | grep postgres`?
user535733 avatar
cn flag
Try `systemctl list-units --type=service` to see if you have a systemd service for postgres. If so, use `sudo systemctl stop <service-name>.service` to halt without respawning. Use `sudo systemctl disable <service-name>.service` to prevent restarting at boot.
in flag
@Paul I got a lot lines `apt list | grep postgres | wc -l \n WARNING: apt does not have a stable CLI interface. Use with caution in scripts. \n 151`
in flag
@user535733 in the list there isn't anything similar to postgres
user535733 avatar
cn flag
When `postgres` is running, try `ps -aux | grep postgres` to find exactly which command is starting the process. Also try `pstree` to see what's launching postgres. Please avoid adding output in comments. Add output in your question instead, where you can properly format the output. Comments are how we ask you for additional information and clarifications. Comments get deleted, so don't put key information in comments.
in flag
@user535733 using `ps` or using `top` I got the father process: I already knew it was `kswap0` which, in turn, has as father `kswap`. I think the "k" stands for "kernel" and killing the anchestor process doesn't seem such a good idea to me,
Score:0
in flag

Got the problem was kswap, I start looking for that; I red a very similar issue in this thread. In that they suggest to limit the resources available for the user that keeps hogging the system.

In my case that user was postgres but I have already purged all the packages.

The hint was the word user; I checked the file /etc/passwd and, even if the packages were purged, the user was still there.

I removed the user from /etc/passwd, reboot, and problem is over :) .

( Note: this ok bacause I don't use postgresql anymore, otherwise you have to follow the other thread's solution. )

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.