- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: Raid Manager problem with a script
Operating System - Linux
1753912
Members
8661
Online
108810
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2008 10:39 AM
11-06-2008 10:39 AM
Raid Manager problem with a script
Good day,
I have a script (which works very fine under HP-UX 11.110 that I want to make it work under
Suse Linux Enterprise Server 10 SP2.
In one of the script, there is a function
function instance_running
#
# Verify if the specified instance is running
# Returns 0 if it is, 1 if it isn't
#
# The instance to test must be passed as the first
# parameter
#
{
INSTANCE=$1
for wInstance in $( running_instances )
do
if [[ $INSTANCE -eq $wInstance ]]
then
# Check if socket file is there
if [ -S /var/tmp/.lcmep0${wInstance} ]
then
return 0
else
return 2
fi
fi
done
return 1
}
The problem is that there is no such thing as /var/tmp/.lcmep0 under Linux.
Does someone knows a workaround for this ?
Regards,
I have a script (which works very fine under HP-UX 11.110 that I want to make it work under
Suse Linux Enterprise Server 10 SP2.
In one of the script, there is a function
function instance_running
#
# Verify if the specified instance is running
# Returns 0 if it is, 1 if it isn't
#
# The instance to test must be passed as the first
# parameter
#
{
INSTANCE=$1
for wInstance in $( running_instances )
do
if [[ $INSTANCE -eq $wInstance ]]
then
# Check if socket file is there
if [ -S /var/tmp/.lcmep0${wInstance} ]
then
return 0
else
return 2
fi
fi
done
return 1
}
The problem is that there is no such thing as /var/tmp/.lcmep0 under Linux.
Does someone knows a workaround for this ?
Regards,
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2008 01:27 PM
11-06-2008 01:27 PM
Re: Raid Manager problem with a script
The /var/tmp/.lcmep0 file should be created by a service/daemon. ¿What do you want to check? ¿An instance of what?
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2008 05:02 AM
11-07-2008 05:02 AM
Re: Raid Manager problem with a script
We are porting some stuff from HP-UX to Linux (Suse).
This script (called from another) is checking if the horcm instance is running or not and do proper action.
This function checks for the existence of the /var/tmp/.lcmdp0*. If not, it is supposed to start the horcm instance.
Under HP-UX this works fine. Under Linux, it seems that horcm uses something else since the /var/tmp/.lcmdp0 does not exists.
I need a workaround or know what Linux uses.
Regards,
This script (called from another) is checking if the horcm instance is running or not and do proper action.
This function checks for the existence of the /var/tmp/.lcmdp0*. If not, it is supposed to start the horcm instance.
Under HP-UX this works fine. Under Linux, it seems that horcm uses something else since the /var/tmp/.lcmdp0 does not exists.
I need a workaround or know what Linux uses.
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2008 07:38 AM
11-07-2008 07:38 AM
Re: Raid Manager problem with a script
I think I have found a workaround for this script to work properly under Linux
function instance_running
#
# Verify if the specified instance is running
# Returns 0 if it is, 1 if it isn't
#
# The instance to test must be passed as the first
# parameter
#
{
INSTANCE=$1
for wInstance in $( running_instances )
do
if [[ $INSTANCE -eq $wInstance ]]
then
# Check if socket file is there
if [ 'ps -ef | grep horcmd_${wInstance}' ]
then
return 0
else
return 2
fi
fi
done
return 1
}
I changed the line to check if the process is running. Simple... but effective.
if [ 'ps -ef | grep horcmd_${wInstance}' ]
Regards,
function instance_running
#
# Verify if the specified instance is running
# Returns 0 if it is, 1 if it isn't
#
# The instance to test must be passed as the first
# parameter
#
{
INSTANCE=$1
for wInstance in $( running_instances )
do
if [[ $INSTANCE -eq $wInstance ]]
then
# Check if socket file is there
if [ 'ps -ef | grep horcmd_${wInstance}' ]
then
return 0
else
return 2
fi
fi
done
return 1
}
I changed the line to check if the process is running. Simple... but effective.
if [ 'ps -ef | grep horcmd_${wInstance}' ]
Regards,
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP