Networking :: Create A Script Which Checks For The 2 Process And Restart It Automatically?
Mar 11, 2010
There are two host agent process ( hprsmha -WD and RSMHA ) running on my SLES 10 server suddenly hangs which is critical for my daily scheduled backup jobs.I want to create a script which checks for the 2 process and restart it automatically.so i can put it to daily cron job.My knowledge with scripting is so poor. Following are the commands i am running manually to stop and start the process.
cd /etc/init.d
./hprmsha stop
./hprsmha_wd stop
./hprsmha_wd start
./hprsmha start
I have just finished the upgrade of the latest version and I'm at the point of my system restating.
My system automatically tried to restart but on the restart I got the 'terminal' view. It stopped when asking for my username (it never normally asks for this before the grub menu) and then password. I didn't get any further than that.
I now have on my screen (still in the terminal view before the grub menu)
"name@name-desktop:...$ "
I'm on my phone now so I don't actually have the symbol for before the dollar sign but your know what it is. The raised S on a 90 degree angle.
I've run ubuntu 9.04, 10.04, and 10.10 on my Dell latitude e6400. On every version the mouse buttons stop working after a few clicks, on the trackpad and with a USB mouse. lock panel is checked if i right click. If i uncheck lock panel it will work for a little bit longer then stops. Anybody know how to fix this?This is my first time using ubuntu and i really want to love it. Had xp before on the Dell, but I don't like it. We're a Mac family, but if this works ubuntu could change our minds!
My network is windows pppoe. How can I configure it for Fedora 11? Is there any graphical configuration tool available for that? Also, ubuntu 9.04 logs into pppoe network after restarting as I've made some changes in /etc/network/interfaces. Is there any option available for Fedora 11 to automatically log in to pppoe network after restarting?
I want to create a logon script (or somesuch) that creates a file (if it doesn't already exist) and checks the file for some info otherwise. If it finds a given trigger in that file, it logs into a local database and does some operations.
Now my problem isn't with creating that file or even getting it to function as a logon script -- it's with permissions. After the logon script creates the file, I want that user to have read access on it ONLY. Further, I don't want to give the user any kind of root access so that they could do the database operations in question or chown/chmod the file.
What's the best practice here? I'm noticing that whenever the script runs (in .bashrc right now) the script runs with the current user's permissions. Ideally, I'd like to make it so the login script can run at a higher level of permissions, (higher than the user has). Is this even possible? What's the best way to do this?
I have a box Suse 11.1 with a service that (I dont know why) every day stop at the same time. Im finding why it come to a halt but in the meantime I would like restart it automatically.As root I insert in crontab the line:25 16 * * * /etc/init.d/service startBut it don works If I launch manually /etc/init.d/service start (or stop) it works
I need to know: how do not automatically restart GNU/Linux after a critical system failure(kernel panic). For some reason the pc is rebooted, actually throws the error screen Reboot just moments before, but I can't to read it before you reboot.
For a kiosk scenario, I run this script to close & restart Firefox when the screensaver is activated (the monitor also goes to sleep).I want to run a loop that, if Firefox is closed, it will automatically re-open. Is there a way to use dbus-monitor to accomplish this?Quote:
#!/usr/bin/perl my $cmd = "dbus-monitor --session "type='signal',interface='org.gnome.ScreenSave r', member='ActiveChanged'"";
I'm trying to get a program to automatically reload if I accidentally close it. This is a remote access program, so it has to be relaunched without me doing anything to help it along if it crashes or I accidentally close it. I noticed that someone came up with a way to solve this back in 2007 [URL].. but the files don't appear to exist any more for it to work. how I might get a program to automatically reload on exit?
some times network disconnected automatically. if we restart rhe server it automatically starts to work. again 2 or 3 days, the same senario is happening. on this server 2 database is running, it makes lot of problem to us. what will be the problem? is any connection parameter is there? (ie i mean only 50 numbers of client connection is only allowed like.) or any problem in NIC card or NIC driver.
I have a process that I cannot kill with kill -9 how to go about this?
[Code]...
It is an openvpn process but I cannot retsrat the service as I alreday have another openvpn service running on the server so when I do openvpn service restart, it won;t know which service to restart.
Suppose a process creates multiple shared mem segments as part of it job.Now is it always possible that on restart, that process can reattach to those previously created shared mem segments to the same virtual address spaces (returned on first time creation) ? My intention is use pointers over shared memory.So on restart I want those pointers absolute value to remain valid.
Does anyone know of an application that continually scans for devices on a network and notifies you if a device connects/disconnects to/from the network? I just want a way of knowing when a computer is connected and when it's not.
I want to start process automatically For Ex:- To start snort it need the root user, So here I need a script which will start snort automatically without asking the root user or password.So that I can start snort from anywhere as same as root
I am using # uname -rmi 2.6.18-194.26.1.el5PAE i686 i386
# cat /etc/*release* cat: /etc/lsb-release.d: Is a directory Red Hat Enterprise Linux Server release 5 (Tikanga) CentOS release 5.5 (Final)
I have noticed that after few days of ideal system it will stop its network interface. To resolve this I have to login to the machine it self and then issue # service network start Is this a feature. If this is not a feature then what is this. As an workaround I am thinking of adding service network restart in cron tab for everyday in night when I am not using it.
I have forgotten my administrative password and am locked out of my system. I have an HP Mini 1120NR and I am running Edubuntu software. I cannot remember which key I need to press during the restart process to bring up the system restore/recovery option.
I have a java service that needs to be run in a gnu screen session so that I can -r into it to access it's interactive shell. I would like this to run at start-up. More importantly, it crashes frequently so I need the service to restart itself when it crashes. How do I go about doing this myself? My previous experience with shell scripting amounts to putting ./service in a file and marking it executable. This will be running on a FreeBSD server, but I might put it on a Linux server soon also. So any caveats on the differences would be useful information.
I have been working on this for a few hours now and still haven't been able to track down whats going on. I just switched servers and put a fresh debian install on with apache2 + custom suexec + php5(fcgi). now when i upload a file to the site it wont upload, so i tracked down the issue. its the /tmp directory that root tmp. its at 100% so i restart the /etc/init.d/apache2 process and the /tmp directory is automagically cleared to 20% used and i can upload again. so i figure ok its got to be a setting. i looked in all the conf files conf.d the php5 conf files and no where do i have a /tmp directory set. so i think OK I can build a cron to clear the tmp directory every 10 mins till i find the issue, but alas, when i go into the tmp directory There are NO files to delete!!! wtf. holy crap. and all that goodness, this is crazy, how can you have a tmp directory that is not being written to, from all i can see, so i think ok it might be a hard link, i checked, in all root and sub root directories no hard links to tmp, no soft links to temp either. and if i sit in my /tmp directory and do a df -h after some uploads its going from 20% so 23% and up, but i do ls -alh and nothing, then ls -al and watch bytes, nothing , so this is very strange. has anyone encountered something like this? is it possible that this is a hard link thats hidden somewhere or some other extreme function i have never heard of?
I haveing a big problem atm (just after to upgrade to 10.04). I have a simply and easy script that sent a halt command to every KVM virtual machine actually running into the server. this script is/and was) palced as a init-rc script in rc0/rc1 and rc6 lvls. Just after to upgrade, I have noticed that this script is executed but the system ignore the time that it require to finish (giving time to correctly stop a single virtual machine). Aftert 5 second it start sending SIG-TERM and SIGN-KILL to any currect process and then reboot/halt.
I have just done a new script using upstart and I got just the same result. What is happending? why is the waiting the init secuence for a valid/or_not termination of any init script. I am so sorry for this crap english I have never study this language so I try to do my best anytime I speak it (or try ti..).
I wanted to put 11.04 on my wife's Win 7 Toshiba laptop so thought I would live boot and see everything worked first. Well it does seem to but I didn't have time to install it then so just shut down. Well on restarting without CD in it failed to boot windows and had to let the recovery process fix it. Now I want to set it up for dual boot at least to start with so until I can get some answers I don't want to risk it. Is there some problem with win 7? Will I be able to shrink the Win7 partition to put ubuntu on? Will Win 7 have an error each time she boots it after 11.04 is installed and run?
We are having a Linux box with Tcpdump continuously running on it to monitor bunch of sources. Separate Tcpdump process runs in a background for each host for monitoring traffic. I use -w option with it to save the capture in the pcap format to analyze it later. Now what I need is, if the Linux machine gets rebooted amidst of its packet capturing activity, I want tcpdump to automatically start the process again for every host without overwriting previous captures.
Remember: Without overwriting previous captures . . . Basically, I will be keeping all the tcpdump commands in the shell script and will load the script at startup during the linux boot. Is there any way to achieve this case, where by on rebooting, Tcpdump does not overwrite previous captures?
i have around 15 zombiee process on my linux ubuntu server 9.10 and i am unable to login I get the system details after i login but the shell promot comes back to login prompt again.My postfix server also stops in between and i have to reboot the entire system.
this is not specifically a slackware related question, but since done on 2 slackware boxes... the situation is, i have one box for browsing and other desktop activities and another box acting as router/local server. what i want to achieve is that the router box would look on a nfs mounted folder for new *.torrent files (which i put there from the desktop box) and if there is a new file, it would start downloading it automatically. also a good thing would be if it would notify me when finished.so how would you go about itwhat torrent client would you use and so on? maybe someone has already done something like this?
I recently upgraded to Ubuntu version 10.10 64-bit and since then closing GEdit won't stop the process automatically when the window is closed and I have to kill it manually. I didn't have this problem with version 10.04 (also 64-bit) and I didn't change any settings after the upgrade.