jueves, 29 de agosto de 2013

Why is plasma desktop hitting cups every once in a while?


I had noticed on gkrellm that there was a process nagging with traffic on the loopback interface hitting cups. I'm running kubuntu 13.04.

I wanted to know what process it was.... I tried with netstat in and endless loop, ntop seemed like a litle too much for what I needed (though I'll take a closer look later on, seems like a very interesting tool), nethogs, lsof... the process just seemed to hide every time. So what is a man to do then? How about making myself show up as cups to see who is causing the trouble? Perhaps I could make it "hold" for a while till I could see with netstat what process it was.

So, first, stopped cups:

$ sudo /etc/init.d/cups stop
[sudo] password for antoranz:
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service cups stop

Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the stop(8) utility, e.g. stop cups

No wonder there.... then, how will I make the process stall? How about a little nc magic? I could use it as bait and see who gets hooked on. So let's start listening on port 631 and wait to see what happens:

$ sudo nc -l 631
Content-Length: 244
Content-Type: application/ipp
Host: localhost:631
User-Agent: CUPS/1.6.2 (Linux 3.8.0-29-generic; i686) IPP/2.0
Expect: 100-continue

printer-stateDprinter-state-messageD                                                                                                 printer-infoD

Can't really tell what it is but the process is waiting so let's see what netstat has to say for us:

$ sudo netstat -ntp | grep 631
tcp        0      0           ESTABLECIDO 2992/plasma-desktop
tcp        0      0          ESTABLECIDO 7217/nc        

Plasma desktop. Now, and getting back on the topic, why is plasma desktop hitting cups so often?

No hay comentarios:

Publicar un comentario en la entrada