Operating System - HP-UX
1753354 Members
5226 Online
108792 Solutions
New Discussion юеВ

Urgent:How to get the node name

 
shivakumar_1
Frequent Advisor

Urgent:How to get the node name

Hi all,

I have some custom code written in some node of a module.In that code i am displaying an error Msg.By using the active module i can get the current module where the code is present, but i also want the Current node i which the code is present. Can anyone Plz help me in this regard.I tried using ActiveDialogName ,but its not working.

Thanks in Advance,
Shiva.
4 REPLIES 4
Steven E. Protter
Exalted Contributor

Re: Urgent:How to get the node name

Shalom,

NODENAME is an environment variable.

echo $NODENAME

Normally it is set in /etc/profile

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
shivakumar_1
Frequent Advisor

Re: Urgent:How to get the node name

Hey Steve,

Thanks for your response. Can you eleborate a bit on that.Can i directly use the echo$Nodename in my Msgbox code.

Regards,
Shiva
skt_skt
Honored Contributor

Re: Urgent:How to get the node name

u may also define like
NODENAME=`hostname`
Suraj K Sankari
Honored Contributor

Re: Urgent:How to get the node name

Hi,

Two way to do the same
1. Using variable that is
nodename=`hostname`
echo $nodename
Or
printf "NODENAME : "$nodename for formatted output
2. Using directly
echo ├в my nodename is : `hostname` is having os `uname ├в s`├в

Suraj