However this polling wastes resources, so is there a better way to do this?
I wouldn't call this a waste of resources. All it takes is a ps and df commands which are not known as being particularly greedy.
You could maybe better target the .app application by using the -C option if provided by your OS:
Just to make sure that I understand your question correctly: the application you are checking, is that the script itself or an external application?
If it is the very same script you want to check the running status of, you can just use a file as a lock. You create a empty file at the beginning of the script and rm it at the end.
Hi Friends,
I need to write a script to kill some processes running for more than 10 minutes. Can I get some pointers on that. Thanks for ur help in Advance.
Thanks&Regards,
Amit (1 Reply)
Hi Friends,
I need to write a script to kill some processes running for more than 10 minutes. Can I get some pointers on that. Thanks for ur help in Advance.
Thanks&Regards,
Amit (1 Reply)
Hi Friends,
I need to write a script to kill some processes running for more than 10 minutes. Can I get some pointers on that. Thanks for ur help in Advance.
Thanks&Regards,
Amit (3 Replies)
Dear All,
I have a script which after executing is not stoping when i press ctrl+c.
Now i want to Append the script in such a way when i press ctrl+c while execution of the program it should take it as arguements and should kill the script/running program forcefully.
I know the command to... (1 Reply)
Gurus/Experts
We have a centralized UNIX/Solaris server from where we can actually ssh to all other UNIX/Solaris servers...I need to write a script that reside on this centerlized server and do FileSystem monitoring (basically run df -h or -k) of other remote servers and then send an email to me... (6 Replies)
Hello
i'm trying to make a program which can find a running program on the system and kill it, then repeat that every 5 minutes. The name of the process is given with an argument. I have done this so far, but still not working.
if $1 in $(ps -e) ; then
kill $(pidof $1)
sleep 5m
fi (3 Replies)
Hey there, sorry if this is a bit too much of a noob question, trying to get to grips with a simple bash script - but i have done ZERO bash scripting.
basically having worked out how to mount and unmount disks using:
disktool -m *device* & disktool -e *device*
- and looking at the result of... (2 Replies)
Hi,
I need a script to kill the process if it running for long time.
Inputs for the scripts:
1.test.sh (will be running fron cron scheduler)
2.1 hr (ie threshold_time - if the test.sh is running for more than 1 hr test.sh has to kill)
Thanks,
Divya (1 Reply)
Hello,
I have multiple scripts (vlc1, vlc2,...vlc5) and as I do not know how to run them as upstart processes, I entered my script links into rc.local file.
Here is the sample one for process vlc1:
$ nano /etc/rc.local
added below line into rc.local
/var/bin/./vlc1 &
Port nr of vlc1... (7 Replies)
Hi,
I making a script to check nfs mount and unmount options.
After various findings, i didn't get any solution for that.
Can you please help me in making the script.
1) I have used,
if grep -qs '/var/JETSHARE' /proc/mounts; then
echo "It's mounted."
else
echo "It's not mounted.
... (2 Replies)
Discussion started by: Santosh101
2 Replies
LEARN ABOUT OPENSOLARIS
firefox
firefox(1) User Commands firefox(1)NAME
firefox - Firefox for Sun Java Desktop System
SYNOPSIS
firefox [options ... ] [url]
DESCRIPTION
Firefox is a free, open-source web browser based on the Mozilla codebase. It is small, fast and easy to use, and offers many advantages
over other browsers, such as the ability to block pop-up windows.
OPTIONS
The following options are supported:
-height value Set the height of startup window to value.
-h or -help Display the help message.
-width value Set the width of startup window to value.
-v or -version Display the version message.
-P profile Start with the profile named: profile.
-ProfileManager Start with profile manager.
-UILocale locale Start with the UI Locale listed: locale.
-safe-mode Disables extensions and themes for this session.
-jsconsole Open the JavaScript console.
-browser Open a browser window.
-setDefaultBrowser Set this app as the default browser.
EXAMPLES
Example 1: Launching Firefox
example% firefox
EXIT STATUS
The following exit values are returned:
0 Application exited successfully
1 Application exited with failure
FILES
The following files are used by this application:
/usr/bin/firefox
Executable for Firefox application
$HOME/.mozilla/firefox
User configuration files for Firefox
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWfirefox |
+-----------------------------+-----------------------------+
|Interface stability |Volatile |
+-----------------------------+-----------------------------+
SEE ALSO
For more information about firefox, please refer to http://www.mozilla.org/firefox
Refer to Help->Help Contents for more information.
NOTES
Updated by Evan Yan, Sun Microsystems Inc., 2008.
SunOS 5.11 10 Jul 2008 firefox(1)