LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   What is "X" as root ? (https://www.linuxquestions.org/questions/linux-newbie-8/what-is-x-as-root-625988/)

The_Watcher 03-05-2008 05:10 PM

What is "X" as root ?
 
Hello,

I did "top" to look at my processes because my machine was slow for some reason. I saw this line:

5170 root 17 0 100 138:22.74 0.4 327m 29m 6244 R X

This is taking up an entire processor, so I am only at 75% efficiency at most. This is a nuisance since I need speed for my work.

Can you tell what "X" is, and why is it being run as root? Can I safely kill or cancel this process (kill -9 5170) ?

Thanks.

dxqcanada 03-05-2008 05:15 PM

This is the X server.
It must run as root.

It can take up a lot of CPU time.

If you don't want it then don't use X Windows and do everything on the console (there are a number of console applications that you can substitute for GUI apps).

The_Watcher 03-05-2008 05:17 PM

Quote:

Originally Posted by The_Watcher (Post 3079359)
Hello,

I did "top" to look at my processes because my machine was slow for some reason. I saw this line:

5170 root 17 0 100 138:22.74 0.4 327m 29m 6244 R X

This is taking up an entire processor, so I am only at 75% efficiency at most. This is a nuisance since I need speed for my work.

Can you tell what "X" is, and why is it being run as root? Can I safely kill or cancel this process (kill -9 5170) ?

Thanks.

In fact, this has now stopped. I was running an other job (hypact_exec), and when that completed the above line changed to:

5170 root 15 0 3 145:16.67 0.4 327m 29m 6244 S X


This means that every time I run that job, I use up 2 processors? How is this possible? How can I cure the problem?

Thanks

The_Watcher 03-08-2008 06:17 AM

Quote:

Originally Posted by dxqcanada (Post 3079363)
This is the X server.
It must run as root.

It can take up a lot of CPU time.

If you don't want it then don't use X Windows and do everything on the console (there are a number of console applications that you can substitute for GUI apps).

Sorry for the naieve question, but how do 'not' use X windows -- I did not do anything special apart from the usual way of launching a job, "./hypact_exec" ?

Cheers

catweasel28 03-08-2008 06:36 AM

GUI or CLI
 
Quote:

Originally Posted by The_Watcher (Post 3081919)
Sorry for the naieve question, but how do 'not' use X windows -- I did not do anything special apart from the usual way of launching a job, "./hypact_exec" ?

Cheers

If you are using a GUI Desktop Environment (KDE, GNOME or whatever) you'll be using X. X is like the framework upon which the GUI is built.
The only way to not use X is to boot to a Command Line Interface and login from there. You'll have a plain screen with a bash prompt from where you can issue commands. Not very pretty - but fast.
It sounds like you don't have a very powerful PC. Perhaps you could supply some details. For, say a Pentium 2 -300MHz with 32MB RAM, even a lightweight window manager like twm would find it hard going.

The_Watcher 03-08-2008 01:51 PM

Quote:

Originally Posted by catweasel28 (Post 3081930)
If you are using a GUI Desktop Environment (KDE, GNOME or whatever) you'll be using X. X is like the framework upon which the GUI is built.
The only way to not use X is to boot to a Command Line Interface and login from there. You'll have a plain screen with a bash prompt from where you can issue commands. Not very pretty - but fast.
It sounds like you don't have a very powerful PC. Perhaps you could supply some details. For, say a Pentium 2 -300MHz with 32MB RAM, even a lightweight window manager like twm would find it hard going.

I have quite a good machine, a server if fact: HP xw9300 workstation. Dual core, dual processor, 2 X 8GB RAM, 2 X 300 GB disc. I use RHEL 4.0.

Could the problem appear when I run something else, like my internet (firefox) etc?

Regards.

dxqcanada 03-09-2008 10:53 AM

Can you provide us the output of top so we can see all the info?

Make sure you paste it with the CODE tags so it is formatted.
Example showing the top 5 process's ... this is my system running KDE and Firefox:
Code:

top - 11:50:00 up 22:50,  2 users,  load average: 0.08, 0.24, 0.24
Tasks:  90 total,  3 running,  87 sleeping,  0 stopped,  0 zombie
Cpu(s):  3.3%us,  1.0%sy,  0.0%ni, 95.0%id,  0.0%wa,  0.3%hi,  0.3%si,  0.0%st
Mem:  1027432k total,  704632k used,  322800k free,    56716k buffers
Swap:  521632k total,        0k used,  521632k free,  380336k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
16658 dennis    20  0  229m  92m  23m R  7.7  9.2  16:37.26 firefox-bin
16545 root      20  0  351m  42m 4952 S  3.0  4.2  8:17.72 X
16636 dennis    20  0 21080  12m  10m S  0.3  1.2  0:49.51 knetstats
20975 root      20  0  2244 1108  852 R  0.3  0.1  0:00.14 top
    1 root      20  0  1596  548  476 S  0.0  0.1  0:01.01 init


The_Watcher 03-09-2008 07:21 PM

[QUOTE=dxqcanada;3083037]Can you provide us the output of top so we can see all the info?

Make sure you paste it with the CODE tags so it is formatted.
Example showing the top 5 process's ... this is my system running KDE and Firefox:

Code:

top - 00:14:51 up 9 days,  8:06, 11 users,  load average: 4.99, 5.35, 5.07
Tasks: 143 total,  7 running, 135 sleeping,  0 stopped,  1 zombie
Cpu0  : 69.0% us,  0.0% sy, 31.0% ni,  0.0% id,  0.0% wa,  0.0% hi,  0.0% si
Cpu1  : 16.9% us,  0.0% sy, 83.1% ni,  0.0% id,  0.0% wa,  0.0% hi,  0.0% si
Cpu2  :  0.0% us,  0.0% sy, 100.0% ni,  0.0% id,  0.0% wa,  0.0% hi,  0.0% si
Cpu3  : 94.9% us,  5.1% sy,  0.0% ni,  0.0% id,  0.0% wa,  0.0% hi,  0.0% si
Mem:  8148552k total,  8106352k used,    42200k free,    88032k buffers
Swap: 16394252k total,      224k used, 16394028k free,  6222640k cached

  PID USER      PR  NI %CPU    TIME+  %MEM  VIRT  RES  SHR S COMMAND
30386 ******    35  10  99  2068:00  3.8  562m 300m  880 R tardes22
 4170 ******    25  0  87  8:58.84  2.0  177m 162m  768 R hypact-exec
 3005 ******    35  10  86 732:18.38  3.8  562m 300m  880 R tardes22
 4153 ******    25  0  67  10:29.23  2.0  177m 162m  768 R hypact-exec
26265 ******    35  10  31  4453:47  3.8  562m 300m  880 R tardes22
 5170 root      16  0  15 294:56.36  0.4  327m  29m 7236 S X
 5646 ******    16  0  12  27:36.74  0.4  183m  33m 9044 R gnome-terminal
    1 root      16  0    0  0:00.65  0.0  4756  552  456 S init

****** is my username.

X appears to well behaved at the moment even though I am running firefox as I write.

Thanks

dxqcanada 03-09-2008 08:21 PM

As long as you are running within an X Windows environment application the "X" process will be running and using resources.

At times the X process will jump to consume a higher processor usage (but then again all process's will use 100% of the CPU).

I do not think the X process is slowing your system down in particular ... otherwise you should always see this process consuming most of your CPU time.

It does appear that your Hypact processes utilize a lot of memory.


Next time click the "#" icon and paste your output between the [ code ] and [ / code ] tags.


All times are GMT -5. The time now is 07:50 AM.