i'm just learning scripting, and have been banging my head against this
I want to check if my WAS6 java process is running and if so..echo me a messages. If not then echo me a different messages
the problem i have is I dont know how to represent a NULL return value. If i grep for a was6... (14 Replies)
So, first and foremost, I'm having issues with my internet connection. Periodically, the connection drops across the network. The fix is simple enough: restart the modem. However, this gets old when the connection dies out every hour.
I can hit my surfboard on 192.168.100.1, and navigate to a... (5 Replies)
Good day
I am fairly new to Shell Scripting.
I want a script to check if a process is up by checking the process's PID and then return a value for when it's running which would be 0. If it isn't running it should give any other value that 0.
Any Help is appreciated
Regards (9 Replies)
we have a server, which becomes down at times and we dont get any notification mail.
Can we monitor PID for that server run and create a script to send notification to a mail id?
I have URL for the server, which I can use.
Please let me know if more information is required from my end to... (2 Replies)
:wall:Dear All.:p
How to check log size every 10min. by script (not crontab)
if log size not change with alert "Log not update"
My Path :: /usr/home/logical/mono/log/tplink/
My Log :: mono11_tplink.log , mono12_tplink.log , etc
I want oup put.
EX. if log not update.
.
.
.
Fri Jan ... (1 Reply)
Hello,
I have various scripts that writes to logs ( >> ) in different directories.
I have create a script to automatically check different direcories for different errrors. However I do not want to remove logs if a script is still writing to a log.
Is the log file opened for writing when the... (7 Replies)
Hi all,
I currently have a UNIX file maintenance script that runs daily as a cron job.
Now I want to change the script and create functions/sub inside it that runs on a weekly or monthly basis.
To run all the scripts' daily maintenance, I want to schedule it in cron as simply maint.sh... (1 Reply)
In a Shell Script what is the most generic way to find in the PID exists or not.
If it does not exist how can I echo the user "PID does not exist" & terminate the unix script ?
If the command can work on most flavors of operating system the more useful I will find it to be.
Current system... (16 Replies)
Hello,
I am running ubuntu14.04
What I am trying to do is restart a process with a shell when pid is dead.
I restored pid nr in a file and check with ps aux | grep -v grep | grep $(cat *.pid)| awk '{ print $2 }'
While surfing on google, I have found an answer saying that restoring pid in a... (2 Replies)
Discussion started by: baris35
2 Replies
LEARN ABOUT OPENSOLARIS
sched_getscheduler
sched_getscheduler(3C) Standard C Library Functions sched_getscheduler(3C)NAME
sched_getscheduler - get scheduling policy
SYNOPSIS
#include <sched.h>
int sched_getscheduler(pid_t pid);
DESCRIPTION
The sched_getscheduler() function returns the scheduling policy of the process specified by pid. If the value of pid is negative, the
behavior of the sched_getscheduler() function is unspecified.
The values that can be returned by sched_getscheduler() are defined in the header <sched.h> and described on the sched_setscheduler(3C)
manual page.
If a process specified by pid exists and if the calling process has permission, the scheduling policy will be returned for the process
whose process ID is equal to pid.
If pid is 0, the scheduling policy will be returned for the calling process.
RETURN VALUES
Upon successful completion, the sched_getscheduler() function returns the scheduling policy of the specified process. If unsuccessful, the
function returns -1 and sets errno to indicate the error.
ERRORS
The sched_getscheduler() function will fail if:
EPERM The requesting process does not have permission to determine the scheduling policy of the specified process.
ESRCH No process can be found corresponding to that specified by pid.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
|ATTRIBUTE TYPE |ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Committed |
+-----------------------------+-----------------------------+
|MT-Level |MT-Safe |
+-----------------------------+-----------------------------+
|Standard |See standards(5). |
+-----------------------------+-----------------------------+
SEE ALSO librt(3LIB), sched.h(3HEAD), sched_getparam(3C), sched_setparam(3C), sched_setscheduler(3C), attributes(5), standards(5)SunOS 5.11 1 Apr 2008 sched_getscheduler(3C)