Sponsored Content
Top Forums Shell Programming and Scripting Warning in Top 10 cpu consuming processes Post 302444206 by pinga123 on Wednesday 11th of August 2010 07:14:01 AM
Old 08-11-2010
Warning in Top 10 cpu consuming processes

I m using following command to find top 10 cpu consuming processes.
However whenever i execute the command i get
following warning.
Quote:
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.7/FAQ
What can be done to avoid it?
Code:
# ps -auxf | sort -nr -k 3 | head -10
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.7/FAQ
root     13494  0.1  0.5   9844  2824 ?        Ss   21:48   0:01  \_ sshd: root@pts/1
xfs       4694  0.0  0.3   3928  1700 ?        Ss   Aug09   0:00 xfs -droppriv -daemon
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
smmsp     4630  0.0  0.2   8048  1492 ?        Ss   Aug09   0:00 sendmail: Queue runner@01:00:00 for /var/spool/clientmqueue
rpc       4268  0.0  0.1   1808   604 ?        Ss   Aug09   0:00 portmap
root         7  0.0  0.0      0     0 ?        S<   Aug09   0:00 [kthread]
root         6  0.0  0.0      0     0 ?        S<   Aug09   0:00 [khelper]
root        52  0.0  0.0      0     0 ?        S<   Aug09   0:00  \_ [kseriod]
root      5115  0.0  0.2   2552  1108 ?        SN   Aug09   0:04 /usr/libexec/gam_server
root      5112  0.0  1.8  24428  9772 ?        SN   Aug09   0:00 /usr/bin/python -tt /usr/sbin/yum-updatesd

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How Can I Have Top Display The Top 20 Processes??

how can i do that in a script withough havin the script halt at the section where the top command is located. am writign a script that will send me the out put of unx commands if the load average of a machine goes beyond the recommended number. top -n 20 i want to save this output to a file... (1 Reply)
Discussion started by: TRUEST
1 Replies

2. UNIX for Dummies Questions & Answers

how to get persistant cpu utilization values per process per cpu in linux (! top,ps)

hi, i want to know cpu utilizatiion per process per cpu..for single processor also if multicore in linux ..to use these values in shell script to kill processes exceeding cpu utilization.ps (pcpu) command does not give exact values..top does not give persistant values..psstat,vmstat..does njot... (3 Replies)
Discussion started by: pankajd
3 Replies

3. AIX

Command to find TOP 5 Memory consuming process

HI All, Can anyone send me a command to find TOP 5 Memory consuming process. It would be lelpful if I get output something like below processname - pid - memory(in MB) - command I tried few commands from the internet but the result only give the real memory usage or pagging, I want total... (4 Replies)
Discussion started by: bce_groups
4 Replies

4. AIX

Need a list of top 10 CPU using processes (also top 10 memory hogs, separately)

Okay, I am trying to come up with a multi-platform script to report top ten CPU and memory hog processes, which will be run by our enterprise monitoring application as an auto-action item when the CPU and Memory utilization gets reported as higher than a certain threshold I use top on other... (5 Replies)
Discussion started by: thenomad
5 Replies

5. UNIX for Dummies Questions & Answers

How To Scroll Processes In top?

I'm using top to view processes. But, I do not know how to scroll down the list to view what is not showed in the terminal window. Anyone know how to do this? (1 Reply)
Discussion started by: keenansnews
1 Replies

6. Shell Programming and Scripting

Print 10 most CPU-intensive processes (wo/ top)

ps -eo pid,comm,%cpu lists all processes (in increasing PID number). How to get only the top-10 most CPU intensive ones? I know about top: this is BASH exercise. I tried redirecting above code to cut ps -eo pid,comm,%cpu | cut -f2but ps' output isn't TAB delimited. How can I otherwise use... (5 Replies)
Discussion started by: courteous
5 Replies

7. Shell Programming and Scripting

Discrepancy in finding the top memory consuming processes

When I run 'top' command,I see the following Memory: 32G real, 12G free, 96G swap free Though it shows as 12G free,I am not able to account for processes that consume the rest 20G. In my understanding some process should be consuming atleast 15-16 G but I am not able to find them. Is... (1 Reply)
Discussion started by: prasperl
1 Replies

8. Shell Programming and Scripting

Unix shell script to query linux top consuming processes

Hi All, O/S: Linux 86x64 Red Hat I have a sql script that queries top consuming processes of Linux using TOP commnd. Now I need to automate this task and pass the top processes i.e., PID to the sql script through unix shell script. Could anyone please let me know how to achieve this. ... (2 Replies)
Discussion started by: a1_win
2 Replies

9. UNIX for Dummies Questions & Answers

Finding the most memory consuming processes in Linux

Platform: Oracle Linux 6.4 To find the most memory consuming processes, I tried the following 2 methods 1. Method1 # ps aux | head -1 ; ps aux | sort -nk +4 | tail -7 USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 95 0.0 0.0 0 0 ? ... (2 Replies)
Discussion started by: kraljic
2 Replies

10. UNIX for Beginners Questions & Answers

Top 5 cpu and Mem consuming process and files and suggestion for health check

I am middle of writing health check scripts, can you pls share commands on how I can get cpu and Mem of top consuming process info at the moment? Also can u suggest ideas on what all I can look for as a part do health check on red hat Linux server? I searched on site before posting, but... (2 Replies)
Discussion started by: Varja
2 Replies
system_munin_plugin_selinux(8)				SELinux Policy system_munin_plugin			    system_munin_plugin_selinux(8)

NAME
system_munin_plugin_selinux - Security Enhanced Linux Policy for the system_munin_plugin processes DESCRIPTION
Security-Enhanced Linux secures the system_munin_plugin processes via flexible mandatory access control. The system_munin_plugin processes execute with the system_munin_plugin_t SELinux type. You can check if you have these processes running by executing the ps command with the -Z qualifier. For example: ps -eZ | grep system_munin_plugin_t ENTRYPOINTS
The system_munin_plugin_t SELinux type can be entered via the system_munin_plugin_exec_t file type. The default entrypoint paths for the system_munin_plugin_t domain are the following: /usr/share/munin/plugins/cpu.*, /usr/share/munin/plugins/if_.*, /usr/share/munin/plugins/nfs.*, /usr/share/munin/plugins/iostat.*, /usr/share/munin/plugins/munin_.*, /usr/share/munin/plugins/yum, /usr/share/munin/plugins/acpi, /usr/share/munin/plugins/load, /usr/share/munin/plugins/swap, /usr/share/munin/plugins/forks, /usr/share/munin/plugins/users, /usr/share/munin/plugins/memory, /usr/share/munin/plugins/uptime, /usr/share/munin/plugins/netstat, /usr/share/munin/plugins/threads, /usr/share/munin/plugins/unbound, /usr/share/munin/plugins/irqstats, /usr/share/munin/plugins/proc_pri, /usr/share/munin/plugins/processes, /usr/share/munin/plugins/inter- rupts, /usr/share/munin/plugins/open_files PROCESS TYPES
SELinux defines process types (domains) for each process running on the system You can see the context of a process using the -Z option to ps Policy governs the access confined processes have to files. SELinux system_munin_plugin policy is very flexible allowing users to setup their system_munin_plugin processes in as secure a method as possible. The following process types are defined for system_munin_plugin: system_munin_plugin_t Note: semanage permissive -a system_munin_plugin_t can be used to make the process type system_munin_plugin_t permissive. SELinux does not deny access to permissive process types, but the AVC (SELinux denials) messages are still generated. BOOLEANS
SELinux policy is customizable based on least access required. system_munin_plugin policy is extremely flexible and has several booleans that allow you to manipulate the policy and run system_munin_plugin with the tightest access possible. If you want to deny any process from ptracing or debugging any other processes, you must turn on the deny_ptrace boolean. Enabled by default. setsebool -P deny_ptrace 1 If you want to allow all domains to use other domains file descriptors, you must turn on the domain_fd_use boolean. Enabled by default. setsebool -P domain_fd_use 1 If you want to allow all domains to have the kernel load modules, you must turn on the domain_kernel_load_modules boolean. Disabled by default. setsebool -P domain_kernel_load_modules 1 If you want to allow all domains to execute in fips_mode, you must turn on the fips_mode boolean. Enabled by default. setsebool -P fips_mode 1 If you want to enable reading of urandom for all domains, you must turn on the global_ssp boolean. Disabled by default. setsebool -P global_ssp 1 If you want to allow confined applications to use nscd shared memory, you must turn on the nscd_use_shm boolean. Disabled by default. setsebool -P nscd_use_shm 1 MANAGED FILES
The SELinux process type system_munin_plugin_t can manage files labeled with the following file types. The paths listed are the default paths for these file types. Note the processes UID still need to have DAC permissions. munin_plugin_state_t /var/lib/munin/plugin-state(/.*)? munin_var_lib_t /var/lib/munin(/.*)? system_munin_plugin_tmp_t FILE CONTEXTS
SELinux requires files to have an extended attribute to define the file type. You can see the context of a file using the -Z option to ls Policy governs the access confined processes have to these files. SELinux system_munin_plugin policy is very flexible allowing users to setup their system_munin_plugin processes in as secure a method as possible. STANDARD FILE CONTEXT SELinux defines the file context types for the system_munin_plugin, if you wanted to store files with these types in a diffent paths, you need to execute the semanage command to sepecify alternate labeling and then use restorecon to put the labels on disk. semanage fcontext -a -t system_munin_plugin_exec_t '/srv/system_munin_plugin/content(/.*)?' restorecon -R -v /srv/mysystem_munin_plugin_content Note: SELinux often uses regular expressions to specify labels that match multiple files. The following file types are defined for system_munin_plugin: system_munin_plugin_exec_t - Set files with the system_munin_plugin_exec_t type, if you want to transition an executable to the system_munin_plugin_t domain. Paths: /usr/share/munin/plugins/cpu.*, /usr/share/munin/plugins/if_.*, /usr/share/munin/plugins/nfs.*, /usr/share/munin/plugins/iostat.*, /usr/share/munin/plugins/munin_.*, /usr/share/munin/plugins/yum, /usr/share/munin/plugins/acpi, /usr/share/munin/plugins/load, /usr/share/munin/plugins/swap, /usr/share/munin/plugins/forks, /usr/share/munin/plugins/users, /usr/share/munin/plugins/memory, /usr/share/munin/plugins/uptime, /usr/share/munin/plugins/netstat, /usr/share/munin/plugins/threads, /usr/share/munin/plugins/unbound, /usr/share/munin/plugins/irqstats, /usr/share/munin/plugins/proc_pri, /usr/share/munin/plugins/processes, /usr/share/munin/plug- ins/interrupts, /usr/share/munin/plugins/open_files system_munin_plugin_tmp_t - Set files with the system_munin_plugin_tmp_t type, if you want to store system munin plugin temporary files in the /tmp directories. Note: File context can be temporarily modified with the chcon command. If you want to permanently change the file context you need to use the semanage fcontext command. This will modify the SELinux labeling database. You will need to use restorecon to apply the labels. COMMANDS
semanage fcontext can also be used to manipulate default file context mappings. semanage permissive can also be used to manipulate whether or not a process type is permissive. semanage module can also be used to enable/disable/install/remove policy modules. semanage boolean can also be used to manipulate the booleans system-config-selinux is a GUI tool available to customize SELinux policy settings. AUTHOR
This manual page was auto-generated using sepolicy manpage . SEE ALSO
selinux(8), system_munin_plugin(8), semanage(8), restorecon(8), chcon(1), sepolicy(8) , setsebool(8) system_munin_plugin 14-06-10 system_munin_plugin_selinux(8)
All times are GMT -4. The time now is 07:43 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy