and make it executable, but the username for the file isn't the one with the rights on the process ids.
Is there a way to get this file to be picked up by a script run as root and executed?
The file should be run as soon as it is fully created (like within one minute or so). What would be a better option, run through crontab, or by using a loop / lockfile?
It should be possible to create more than one of these files, so the filename should be variable.
If you can get the output displaying the PIDs in a row like "1122 45559 29392", you can just issue 1 kill with them all as parameter. Also better issue a normal kill without -9. And after a sleep of let's say 10 seconds, you can issue the kill with -9, just to make sure the processes are able to end and clean up everything they had allocated.
For the root permission you should check out "sudo".
@zaxxon:
Sudo is not installed on our HP-UX server, but I'll talk to our administrator later today.
Quote:
Originally Posted by sunpraveen
Meert,
All Oracle process ids are owned by the oracle software owner (like oracle).
Sounds like you do not have access to oracle user, yet you want to kill processes owned by that user, which can only be done a super user like root.
Usually, killing the session in oracle should clean the unix processes too.
As sys, run the below:
If there is some limitation which prevents you from running the above, then we can think of something.
HTH,
Regards,
Praveen
@Praveen:
The issue is that the alter system command leaves the original proccesses running in UNIX.
The case at hand is that it is an RF handscanner that connects through telnet to the database. If the scanner loses connection, we can do a reset of the database connection through alter system but for the user to reconnect to the scanner, we need to kill only the rfprocess ids and leave the display process running.
Note that the below script is an infinite loop. So, you have to either do Ctrl+C or kill the process id to end it.
contents of find_process_ids_to_kill.sql:
Note that the above script would work only if it is the owner of the process that it is killing. If not, then it cannot kill. Then you would have to use root or any other superuser.
Praveen, thank you very much. This is a good start and I'll try and work from here.
I tried to spool the output to the process_id_to_kill.txt from an sql script but got a "cannot spool" access denied message, probably because the file was in use by the "infinite loop" script.
the task is grant user1 to kill another (for example user2) process. My steps:
by root:
usermod -P "Process Management" user1
login user1
user1@server (~) pfexec kill <PID>
the result is:
ksh: <PID>: not found
or user1@server (~) pfexec pkill <PID>
the result: nothing happens, still... (0 Replies)
Hi folks,
I want to kill all process of oracle user and won't kill shell, should i try this? Please confirm.
1st way
pgrep -u oracle | sudo xargs kill -9
2nd way
killall -u oracle (2 Replies)
Hi!
I need your help, please.
I'm in AIX node and sometimes listener process from an oracle instance gets duplicated, i mean that it get spawned a second listener process. As we can't apply changes to the databases on this months, i want to build a shell that can identify the second... (6 Replies)
How can I kill a process owned by user1? I will be using another user (user2) (not root) and we are on the same primary and secondary group. I copied everything including it's .profile and set the path accordingly.
user1@hostnmae0:/home/user1 $ pkill java
pkill: Failed to signal pid 1234:... (2 Replies)
Hi Here is my problem:
1)I am login to unix server through my login id and do SU - xxx
2) Start the script which is running in background
I want that other user which login to there id and do SU - yyy(Different user) kill that
script.
Could you please help me in this. (9 Replies)
What I need to learn is how to use a script that launches background processes, and then kills those processes as needed.
The script successfully launches the script. But how do I check to see if the job exists before I kill it?
I know my problem is mostly failure to understand parameter... (4 Replies)
Hi Experts, we do have a shell script for Unix Solaris, which will kill all the process manullay, it used to work in my previous env, but now it is throwing this error.. could some one please help me to resolve it
This is how we execute the script (and this is the requirement) ... (2 Replies)
Hey
I'm writing a script that creates some processes,and some scripts which kill those processes.
the question is Simply:
How can I allow a group members to be able to kill (using kill command) processes created by other user at the same group?
and i need the change to be at the script... (5 Replies)
Hi,
I scheduled one script through crontab command and seems like it is hanging. I come to know this through the command 'ps -ef' whcih is showing me the program running, but no chances of it to take more than 2hrs to comlpete.
I want to kill that process. I tried to kill it using the... (6 Replies)