Sponsored Content
Top Forums UNIX for Beginners Questions & Answers How to detect which process is run by what? Post 303038375 by baris35 on Sunday 1st of September 2019 08:52:56 AM
Old 09-01-2019
How to detect which process is run by what?

Hello,
I am running under ubuntu 14.04
Very long time ago, I set a script (ban.sh) to block ip addresses abusing my system which was not active.
I have not touched the server over six months or more.
Today, after restart the system, ban.sh started running all of a sudden and keep submitting email to me every 2/3 minutes.
I put # in front of my ban.sh task in crontab -e
/etc/crontab has no rule.
After this change, it keeps sending me emails. Does it require hardware reboot or network restart to make activate the changes or how may I know which process/script is forcing ban.sh to start again?

PS: As a palliative solution, I have ran apt-get autoremove mail*
Thank you
Boris

Last edited by baris35; 09-01-2019 at 10:03 AM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to detect process

Dear Sir, Now I use oracle database on AIX server and found some user use iligal program such as development tool logon to my database. I want to detect the process of illegal program and kill it. Could you please suggest me to make detect process. Thank you very much Pkanonwe. (2 Replies)
Discussion started by: pkanonwe
2 Replies

2. UNIX for Dummies Questions & Answers

How can I run a process under particular ID?

I have a script that needs to run under ID say "xyz". the way I do normally is to "su" to the id, enter the password of "xyz" and run the process. However, is there any way run the process under "xyz" without "su" to the ID. A person with root access would be able to run any process under any ID as... (4 Replies)
Discussion started by: ucbus
4 Replies

3. UNIX for Dummies Questions & Answers

Check the process before run or not

Dear all, I am writing a shell that check the java application already run. If it is not run before it will run next commands. ps -ef | grep java Thank you :) (3 Replies)
Discussion started by: mr_bold
3 Replies

4. UNIX for Dummies Questions & Answers

Run a detached process

Hey guys, Just wondering is there anyway that I would be able to run a detached process that would continue to run regardless of me being logged into the linux host? (4 Replies)
Discussion started by: killaram
4 Replies

5. Shell Programming and Scripting

script to monitor the process system when a process from user takes longer than 15 min run.

get email notification from from system when a process from XXXX user takes longer than 15 min run.Let me know the time estimation for the same. hi ,any one please tell me , how to write a script to get email notification from system when a process from as mentioned above a xxxx user takes... (1 Reply)
Discussion started by: kirankrishna3
1 Replies

6. Shell Programming and Scripting

How to run a particular process

Hi I have a perl script where i created 3 nmap scans and the results will output to a text file. But when i run the code the first ip address gets scanned then the others after, but i want to be able to choose which ip address to scan. Here is my code: (`nmap -v -r 99.xxx.xxx -p... (0 Replies)
Discussion started by: kingbp
0 Replies

7. Shell Programming and Scripting

How to detect that foreground process is waiting for input?

Hi, I have to create a script (ksh or perl) that starts certain number of parallel jobs (another scripts), each of them runs as a foreground process in a separate session. Plus I start monitoring job that has to determine if any of those scripts is expecting input from operator, and switch to... (4 Replies)
Discussion started by: andyh80
4 Replies

8. Shell Programming and Scripting

How to detect Hanged process in shell script?

I have to check daily 20 processes each day. The names are like Network1 Network2 Network3 ....... Network20. There is built in utility for doing this. Following is the command to check a single network process. check_process_status 1 If we want to check the status of Network2 then the... (6 Replies)
Discussion started by: Nakul_sh
6 Replies

9. Shell Programming and Scripting

Using grep command to detect presence of script run

i have this line of code on a korn shell script to detect the presence of script run: ISRUNNING=`ps -eaf -o args | grep -i sfs_load_file.ksh | grep -v grep | wc -l` sometimes this returns either 1, 2, or 3. when it returns 2 or 3 that tells us that there are more than 1 script of... (8 Replies)
Discussion started by: wtolentino
8 Replies

10. Ubuntu

Detect and run command upon mouse movement

I am trying to find a way to run a command upon any movement of a mouse. The 1st statement shows the mouse co-ordinates. So it can detect mouse movement. xinput test 9 First list input devices: $ xinput list If possible, I would like to use it in a bash script. (2 Replies)
Discussion started by: drew77
2 Replies
PACEMAKER(8)						  System Administration Utilities					      PACEMAKER(8)

NAME
Pacemaker - Part of the Pacemaker cluster resource manager SYNOPSIS
crm_resource (query|command) [options] DESCRIPTION
crm_resource - Perform tasks related to cluster resources. Allows resources to be queried (definition and location), modified, and moved around the cluster. OPTIONS
-?, --help This text -$, --version Version information -V, --verbose Increase debug output -Q, --quiet Print only the value on stdout -r, --resource=value Resource ID Queries: -L, --list List all cluster resources -l, --list-raw List the IDs of all instantiated resources (no groups/clones/...) -O, --list-operations List active resource operations. Optionally filtered by resource (-r) and/or node (-N) -o, --list-all-operations List all resource operations. Optionally filtered by resource (-r) and/or node (-N) --list-standards List supported standards --list-ocf-providers List all available OCF providers --list-agents=value List all agents available for the named standard and/or provider. --list-ocf-alternatives=value List all available providers for the named OCF agent --show-metadata=value Show the metadata for the named class:provider:agent -q, --query-xml Query the definition of a resource (template expanded) -w, --query-xml-raw Query the definition of a resource (raw xml) -W, --locate Display the current location(s) of a resource -A, --stack Display the prerequisites and dependents of a resource -a, --constraints Display the (co)location constraints that apply to a resource Commands: -C, --cleanup Delete the resource history and re-check the current state. Optional: --resource -p, --set-parameter=value Set the named parameter for a resource. See also -m, --meta -g, --get-parameter=value Display the named parameter for a resource. See also -m, --meta -d, --delete-parameter=value Delete the named parameter for a resource. See also -m, --meta Resource location: -M, --move Move a resource from its current location to the named destination. Requires: --host. Optional: --lifetime, --master NOTE: This may prevent the resource from running on the previous location node until the implicit constraints expire or are removed with --unban -B, --ban Prevent the named resource from running on the named --host. Requires: --resource. Optional: --host, --lifetime, --master If --host is not specified, it defaults to: * the curent location for primitives and groups, or * the curent location of the master for m/s resources with master-max=1 All other situations result in an error as there is no sane default. NOTE: This will prevent the resource from running on this node until the constraint expires or is removed with --clear -U, --clear Remove all constraints created by the --ban and/or --move commands. Requires: --resource. Optional: --host, --master If --host is not specified, all constraints created by --ban and --move will be removed for the named resource. -u, --lifetime=value Lifespan of constraints created by the --ban and --move commands --master Limit the scope of the --ban, --move and --clear commands to the Master role. For --ban and --move, the previous master can still remain active in the Slave role. Advanced Commands: -D, --delete (Advanced) Delete a resource from the CIB -F, --fail (Advanced) Tell the cluster this resource has failed --force-stop (Advanced) Bypass the cluster and stop a resource on the local node. Additional detail with -V --force-start (Advanced) Bypass the cluster and start a resource on the local node. Additional detail with -V --force-check (Advanced) Bypass the cluster and check the state of a resource on the local node. Additional detail with -V Additional Options: -N, --node=value Host uname --recursive Follow colocation chains when using --set-parameter -t, --resource-type=value Resource type (primitive, clone, group, ...) -v, --parameter-value=value Value to use with -p, -g or -d -m, --meta Modify a resource's configuration option rather than one which is passed to the resource agent script. For use with -p, -g, -d -z, --utilization Modify a resource's utilization attribute. For use with -p, -g, -d -s, --set-name=value (Advanced) ID of the instance_attributes object to change -i, --nvpair=value (Advanced) ID of the nvpair object to change/delete -f, --force EXAMPLES
List the configured resources: # crm_resource --list List the available OCF agents: # crm_resource --list-agents ocf List the available OCF agents from the linux-ha project: # crm_resource --list-agents ocf:heartbeat Display the current location of 'myResource': # crm_resource --resource myResource --locate Move 'myResource' to another machine: # crm_resource --resource myResource --move Move 'myResource' to a specific machine: # crm_resource --resource myResource --move --node altNode Allow (but not force) 'myResource' to move back to its original location: # crm_resource --resource myResource --un-move Tell the cluster that 'myResource' failed: # crm_resource --resource myResource --fail Stop a 'myResource' (and anything that depends on it): # crm_resource --resource myResource --set-parameter target-role --meta --parameter-value Stopped Tell the cluster not to manage 'myResource': The cluster will not attempt to start or stop the resource under any circumstances. Useful when performing maintenance tasks on a resource. # crm_resource --resource myResource --set-parameter is-managed --meta --parameter-value false Erase the operation history of 'myResource' on 'aNode': The cluster will 'forget' the existing resource state (including any errors) and attempt to recover the resource. Useful when a resource had failed permanently and has been repaired by an administrator. # crm_resource --resource myResource --cleanup --node aNode AUTHOR
Written by Andrew Beekhof REPORTING BUGS
Report bugs to pacemaker@oss.clusterlabs.org Pacemaker 1.1.10-29.el7 June 2014 PACEMAKER(8)
All times are GMT -4. The time now is 11:32 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy