I assume that you have a Platform.pm available somewhere on your system. There are a few ways to include it, but the easiest in my view is to add the following at the top of your script...
This dynamically adds the directory to the @INC variable before any of the main code runs and makes it clear what you're doing. You can do the same thing by adding a -I option on the command line but then you have to invoke Perl explicitly rather than just executing your .pl script
Having them listed in your perl script is not the same as having the modules installed on your system somewhere.
The @INC is a list of directories where perl will look to find these modules.
It wouldn't hurt to run a simple command to see if the file exists and is simply not in the path:
I assume that you have a Platform.pm available somewhere on your system. There are a few ways to include it, but the easiest in my view is to add the following at the top of your script...
This dynamically adds the directory to the @INC variable before any of the main code runs and makes it clear what you're doing. You can do the same thing by adding a -I option on the command line but then you have to invoke Perl explicitly rather than just executing your .pl script
Yes, Platform.pm is on the system
I don't really want to add the @INC variable at this time because I'm completely sure what even caused the perl process to stop, if it was due to the network outage then thats fine I just want to know that I'm not trying to initiate something that had been terminated because of another problem in the system.
I thought I had a disaster recovery plan so that I could reboot the system entirely myself in a matter of a few short steps but I think we blew that off or forgot about it. My sysadmin is off onto another adventure and unreachable so I'm trying my best to not do more harm than good.
---------- Post updated at 04:39 PM ---------- Previous update was at 04:25 PM ----------
Quote:
Originally Posted by avronius
It wouldn't hurt to run a simple command to see if the file exists and is simply not in the path:
i ran that and its in the same directory
/same/path/to/aws-daemon
How does @INC provide the path, in other words it looks like it provides the path to
Is it possible that when the reboot occured it upgraded to 5.8.8 and wiped the @INC array clean?
If thats the case, then this /path/to/Platform.pm may just be one of many that are now missing in the @INC array, so if I just manually add it back in via command line as:
Now I also see a Platform.pm.old in the same directory but not sure if that is of any help.
---------- Post updated at 08:03 PM ---------- Previous update was at 04:56 PM ----------
I tried doing the perl -I command and it didn't seem to add it to the @INC list
---------- Post updated at 09:57 PM ---------- Previous update was at 08:03 PM ----------
Ok another discovery
when I login to root with su the /Platform.pm and the /aws.conf are not there
is that what the problem is? when I'm logged in as a regular user they are there.
---------- Post updated 09-02-09 at 03:39 PM ---------- Previous update was 09-01-09 at 09:57 PM ----------
Quote:
Originally Posted by JerryHone
I assume that you have a Platform.pm available somewhere on your system. There are a few ways to include it, but the easiest in my view is to add the following at the top of your script...
This dynamically adds the directory to the @INC variable before any of the main code runs and makes it clear what you're doing. You can do the same thing by adding a -I option on the command line but then you have to invoke Perl explicitly rather than just executing your .pl script
Added the following to the top of the script, which worked.
Team,
I have multiple batchjobs running in VM, if I do ps -ef |grep java or tomcat I am getting multiple process list.
How do I get my exact tomcat process running and that is unique? via shell script? (4 Replies)
Hi Experts,
I am facing one problem here which is one process always stuck in running state which causes the other similar process to sleep state . This causes my system in hanged state.
On doing cat /proc/<pid>wchan showing the "__init_begin" in the output.
Can you please help me here... (6 Replies)
Hi Experts,
I am facing one problem here which is one process always stuck in running state which causes the other similar process to sleep state . This causes my system in hanged state.
On doing cat /proc/<pid>wchan showing the "__init_begin" in the output.
Can you please help me here... (0 Replies)
Hi, I have written a script that allows me to repetitively play a music file $N times, which is specified through user input. However, if I want to exit the script before it has finished looping $N times, if I use CTRL+c, I have to CTRL+c however many times are left in order to complete the loop.... (9 Replies)
X Window isn't working.
When I ran startx I got an error message as shown in file attachment xwndow.png
Accordingly, I removed /tmp/.X0-lock as reflecting in the attchment.
Then again I ran the command and 2 more commands (shown in the attachment xwndow1.png) but they failed too.
Any... (2 Replies)
Hi Gurus,
Could you please help me to create a shell script that will be started by a cron job once every night at 24.00 h (that should bee easy:))
The shell script should control every 30 seconds the name of a process, and when the process doesn't run anymore it should execute a few further... (12 Replies)
Hello all,
I would be happy if any one could help me with a shell script that would determine all the processes running on a Unix server and post a mail if any of the process is not running or aborted.
Thanks in advance
Regards,
pradeep kulkarni.
:mad: (13 Replies)
Hi,
I got a simple script working to check if a process is running and then email if it is not running anymore. My scenario is that I need to make sure the process is always running so instead of running the below script via cron I think it is better to a have a looping script to check... (12 Replies)
Hi All,
I am new to perl and have been trying to write a short script to check a process.Though i havent reached to the stage where i can match the output.
I am trying to pass a variable x with value /opt/RGw/csbp-base/CSBP_BAT.01.00.05/csbp_BAT.01.00.05.jar
and then pass another variable... (2 Replies)
last week i started learning perl, so have limited skill and knowledge.
why isn't 'die' being called and the script exiting before the 'directory created' line?
if (! -d "$logdir") {
system "mkdir -p $logdir" || die print "\nERROR: release log directory creation failed - $logdir: $!\n";... (4 Replies)