Sponsored Content
Top Forums Shell Programming and Scripting Process running time by taking user input Post 302790541 by DGPickett on Friday 5th of April 2013 03:56:49 PM
Old 04-05-2013
Seems simple:
Code:
$ ps -efx | grep -v '^.\{41\} [ 1-2][0-9]:[0-5][0-9] ' | pg
     UID   PID  PPID  C    STIME TTY       TIME COMMAND
    root     3     0  3  Feb 16  ?        285:57 statdaemon
    root   486     1 10  Feb 16  ?        1386:01 /usr/sbin/syncer
    root    40     0  0  Feb 16  ?        103:51 vxfsd
    root  1861  1443  0  Feb 16  ?        80:01 diaglogd
    root   617   616  0  Feb 16  ?        38:28 /usr/sbin/netfmt -C -F -f /var/adm/nettl.LOG00 -c /var/adm/conslog.opts
    root   750     1  0  Feb 16  ?        138:56 /opt/quest/sbin/vasd -p /var/opt/quest/vas/vasd/.vasd.pid
    root  1600     1  0  Feb 16  ?        90:44 /opt/perf/bin/scopeux
 
 .
 .
 .
 .

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

keeping 10 process running at the same time

Hi guys, I neet to run sqlldr to charge about 50,000 files every day to my DWH, so I need to make an script to keep about 100 processes of sqlldr running at the same time. So, the issue is that i've been trying for a few days to make an script which can keep that amount of processes running, so... (2 Replies)
Discussion started by: razziel
2 Replies

2. Red Hat

login process taking a long time

I'm having a bit of a login performance issue.. wondering if anyone has any ideas where I might look. Here's the scenario... Linux Red Hat ES 4 update 5 regardless of where I login from (ssh or on the text console) after providing the password the system seems to pause for between 30... (4 Replies)
Discussion started by: retlaw
4 Replies

3. Shell Programming and Scripting

Problem while taking input from User

Hi All, I am facing a problem while taking input from user in Shell Script. Basically , I want to read a file line by line. And I want to remove certain lines of that file.But before removing those lines , I need to ask the user whether user wants to remove the lines. If user inputs "Yes" , the... (3 Replies)
Discussion started by: swapnil.nawale
3 Replies

4. UNIX for Dummies Questions & Answers

how to get start time of a running process

I am trying to see if a process is running what was its start time. here is the code that I am using if then echo 'Gateway output processing started.' else VAR=$(ps -ef | grep batch_output_x ) ... fi now the problem i see is when the process is running i get two... (3 Replies)
Discussion started by: akabir77
3 Replies

5. Shell Programming and Scripting

Running a process based on time

Hello All, My script is nearly complete, there is just one last piece that needs to be added in. I need to check for the time, and if it is lets say for example. Sunday at 5:00AM, my script cannot run. I would assume it would be something like this, parden the terrible pseudocode ... (7 Replies)
Discussion started by: jeffs42885
7 Replies

6. Shell Programming and Scripting

Taking one input at a time

Legends, Please help me to come out of the below Bermuda triangle. I have four inputs in a shell script: A B C D Now, If A is passed by user then, B C D will be ignored. If C is passed by user, then A B D will be ignored. Regards, Sandy (11 Replies)
Discussion started by: sdosanjh
11 Replies

7. Shell Programming and Scripting

Help with kill a specific process after certain running time

Hi, Do anybody experience to write a bash script in order to kill a specific process (java) after certain time of running? eg. java java.jar task_run.txt I will run a java program (java.jar) which will run a long list of process (task_run.txt) one by one. I plan to terminate the java... (5 Replies)
Discussion started by: perl_beginner
5 Replies

8. Shell Programming and Scripting

Process running more than require time

Frineds I need assistance in writing a script . Newbie to scripting. How to find list of processes that are running more than an hour . Below i used the step to get the etime and stime . Now by getting the result i need to display longer time process with full listing. ps -aef -o... (10 Replies)
Discussion started by: ajayram_arya
10 Replies

9. Shell Programming and Scripting

Bash Question: HowTo Exit Script with User Input While Process is Running Mid-Loop?

Hi, I have written a script that allows me to repetitively play a music file $N times, which is specified through user input. However, if I want to exit the script before it has finished looping $N times, if I use CTRL+c, I have to CTRL+c however many times are left in order to complete the loop.... (9 Replies)
Discussion started by: hilltop_yodeler
9 Replies

10. Shell Programming and Scripting

Get how much time process has been running in seconds

I use this command to get the time elapsed for a process ps -eo pid,pcpu,pmem,user,args,etime,cmd --sort=start_time | grep perl It gives in format 19990 0.0 0.0 user /usr/bin/php 5-09:58:51 /usr/bin/php I need in seconds. Please use CODE tags for sample input and output as well... (2 Replies)
Discussion started by: anil510
2 Replies
remote_login_selinux(8) 				    SELinux Policy remote_login 				   remote_login_selinux(8)

NAME
remote_login_selinux - Security Enhanced Linux Policy for the remote_login processes DESCRIPTION
Security-Enhanced Linux secures the remote_login processes via flexible mandatory access control. The remote_login processes execute with the remote_login_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 remote_login_t ENTRYPOINTS
The remote_login_t SELinux type can be entered via the login_exec_t file type. The default entrypoint paths for the remote_login_t domain are the following: /bin/login, /usr/bin/login, /usr/kerberos/sbin/login.krb5 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 remote_login policy is very flexible allowing users to setup their remote_login processes in as secure a method as possible. The following process types are defined for remote_login: remote_login_t Note: semanage permissive -a remote_login_t can be used to make the process type remote_login_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. remote_login policy is extremely flexible and has several booleans that allow you to manipulate the policy and run remote_login with the tightest access possible. If you want to allow users to resolve user passwd entries directly from ldap rather then using a sssd server, you must turn on the authlo- gin_nsswitch_use_ldap boolean. Disabled by default. setsebool -P authlogin_nsswitch_use_ldap 1 If you want to allow users to login using a radius server, you must turn on the authlogin_radius boolean. Disabled by default. setsebool -P authlogin_radius 1 If you want to allow users to login using a yubikey server, you must turn on the authlogin_yubikey boolean. Disabled by default. setsebool -P authlogin_yubikey 1 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 run with kerberos, you must turn on the kerberos_enabled boolean. Enabled by default. setsebool -P kerberos_enabled 1 If you want to allow system to run with NIS, you must turn on the nis_enabled boolean. Disabled by default. setsebool -P nis_enabled 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 If you want to enable polyinstantiated directory support, you must turn on the polyinstantiation_enabled boolean. Disabled by default. setsebool -P polyinstantiation_enabled 1 If you want to allow a user to login as an unconfined domain, you must turn on the unconfined_login boolean. Enabled by default. setsebool -P unconfined_login 1 If you want to support ecryptfs home directories, you must turn on the use_ecryptfs_home_dirs boolean. Disabled by default. setsebool -P use_ecryptfs_home_dirs 1 If you want to support fusefs home directories, you must turn on the use_fusefs_home_dirs boolean. Disabled by default. setsebool -P use_fusefs_home_dirs 1 If you want to support NFS home directories, you must turn on the use_nfs_home_dirs boolean. Disabled by default. setsebool -P use_nfs_home_dirs 1 If you want to support SAMBA home directories, you must turn on the use_samba_home_dirs boolean. Disabled by default. setsebool -P use_samba_home_dirs 1 NSSWITCH DOMAIN
If you want to allow users to resolve user passwd entries directly from ldap rather then using a sssd server for the remote_login_t, you must turn on the authlogin_nsswitch_use_ldap boolean. setsebool -P authlogin_nsswitch_use_ldap 1 If you want to allow confined applications to run with kerberos for the remote_login_t, you must turn on the kerberos_enabled boolean. setsebool -P kerberos_enabled 1 MANAGED FILES
The SELinux process type remote_login_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. auth_cache_t /var/cache/coolkey(/.*)? auth_home_t /root/.yubico(/.*)? /root/.google_authenticator /root/.google_authenticator~ /home/[^/]*/.yubico(/.*)? /home/[^/]*/.google_authenticator /home/[^/]*/.google_authenticator~ cgroup_t /cgroup(/.*)? /sys/fs/cgroup(/.*)? faillog_t /var/log/btmp.* /var/log/faillog.* /var/log/tallylog.* /var/run/faillock(/.*)? initrc_var_run_t /var/run/utmp /var/run/random-seed /var/run/runlevel.dir /var/run/setmixer_flag krb5_host_rcache_t /var/cache/krb5rcache(/.*)? /var/tmp/nfs_0 /var/tmp/DNS_25 /var/tmp/host_0 /var/tmp/imap_0 /var/tmp/HTTP_23 /var/tmp/HTTP_48 /var/tmp/ldap_55 /var/tmp/ldap_487 /var/tmp/ldapmap1_0 lastlog_t /var/log/lastlog.* pam_var_console_t /var/run/console(/.*)? pam_var_run_t /var/(db|lib|adm)/sudo(/.*)? /var/run/sudo(/.*)? /var/run/sepermit(/.*)? /var/run/pam_mount(/.*)? security_t /selinux user_tmp_t /var/run/user(/.*)? /tmp/hsperfdata_root /var/tmp/hsperfdata_root /tmp/gconfd-.* var_auth_t /var/ace(/.*)? /var/rsa(/.*)? /var/lib/abl(/.*)? /var/lib/rsa(/.*)? /var/lib/pam_ssh(/.*)? /var/run/pam_ssh(/.*)? /var/lib/pam_shield(/.*)? /var/opt/quest/vas/vasd(/.*)? /var/lib/google-authenticator(/.*)? wtmp_t /var/log/wtmp.* 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), remote_login(8), semanage(8), restorecon(8), chcon(1), sepolicy(8) , setsebool(8) remote_login 14-06-10 remote_login_selinux(8)
All times are GMT -4. The time now is 10:45 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy