Operating System - HP-UX
1755080 Members
3645 Online
108829 Solutions
New Discussion юеВ

Re: Starting PerfView from Command Line

 
SOLVED
Go to solution
David Fosgate_1
Occasional Advisor

Starting PerfView from Command Line

 
7 REPLIES 7
David Fosgate_1
Occasional Advisor

Re: Starting PerfView from Command Line

I just installed perfview on our new server:
swlist indicates: Trial HP PerfView for s800 11.00.
I wanted to run this product from the command line. My connection to the server is via reflection session. The guide asks to export the workstationid. I found that on the PS command and made the following entry: ttyp2.
With this variable set I tried the pv command and received the following error:

Error: Can't open display: ttyp2
Error: Couldn't find per display information

Where do I find the correct display entry information?
I'm running this as root, any ideas?
Rick Garland
Honored Contributor
Solution

Re: Starting PerfView from Command Line

You need to set your DISPLAY variable back to where you are. What is the IP address you are at?

export DISPLAY=

Also, you may need to issue the 'xhosts' command on the server. This will allow clients (the PC) to do an X-connect to the server. There are options with the xhosts command and security concerns.
Alan Riggs
Honored Contributor

Re: Starting PerfView from Command Line

Generally, the DISPLAY variable will require a :0 after the IP. For instance:

export DISPLAY=10.92.250.23:0

If you are on a workstation or Xserver you will need to open your xhosts to allow communication, but when using an emulator like exceed/reflections that is not necessary.
James R. Ferguson
Acclaimed Contributor

Re: Starting PerfView from Command Line

David:

Adding to Rick & Alan's solution, here is a generalized way to get your IPAddress and set the DISPLAY variable:

# DISPLAY=`who -Rmu|awk '{print $NF}'|nslookup|awk '$1~/Address/ {print $2}'`:0

#export DISPLAY

Regards!

...JRF...
John Eaton
Frequent Advisor

Re: Starting PerfView from Command Line

The previous comments answer the key issues, but thought you might find this helpful:
We have a big Reflections userbase, and I added the following to our /etc/profile ages ago to set the DISPLAY variable when a user logs in:
if [ ! "$DISPLAY" ]
then
DISPLAY=`who -Rm | awk -F '[()]' '{print $2}'`:0
export DISPLAY
fi
The only problem we've found is when you rlogin or telnet from server to server, the DISPLAY variable gets set to the originating server. One possible solution for rlogin would be to alias it to remsh with the DISPLAY variable set... Probably more ways around it, too.
Alan Riggs
Honored Contributor

Re: Starting PerfView from Command Line

John's comment illustrates why I prefer not to access `who` to set my DISPLAY. I move between boxes frequently, so the `who` information does not always reflect the display I am working on. Therefore, I set it in my .profile (which I keep consistent between machines). Actually, I prefer to work without the DISPLAY set for most things -- nothing slower or more annoying that GUI displays across slow pipe from Europe. But I have an alias defined in my .profile to set the DISPLAY when I need it.
David Fosgate_1
Occasional Advisor

Re: Starting PerfView from Command Line

Thanks everyone for your assistance, I have the product running and no doubt will have additional questions.

Best Regards,

Dave