- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Editing a commad response to a switch BPX
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
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
Discussion Boards
Community
Resources
Forums
Blogs
- 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
01-13-2003 02:16 PM
01-13-2003 02:16 PM
Editing a commad response to a switch BPX
First I run a script which send commands to a switch BPX, then I catch the response generated redirecting it to a file.
When I read the file in solaris using tail there is no matter(I read at least the last lines), when I use more or other command like cat, almost all the response displayed are just ascci characters.
When I try to read the file in HP-UX is even worst, I can't read the file anyway.
I would be rally pleased If someone could help me.
The command response is in the file attached, the command sent is dspcons.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2003 02:24 PM
01-13-2003 02:24 PM
Re: Editing a commad response to a switch BPX
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2003 02:59 PM
01-13-2003 02:59 PM
Re: Editing a commad response to a switch BPX
I'll try it rigth now anyway.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2003 03:04 PM
01-13-2003 03:04 PM
Re: Editing a commad response to a switch BPX
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2003 03:12 PM
01-13-2003 03:12 PM
Re: Editing a commad response to a switch BPX
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2003 04:07 PM
01-13-2003 04:07 PM
Re: Editing a commad response to a switch BPX
See http://enterprise.aacc.edu/~rhs/ansi.html for a simple explanation of the ANSI standard escape sequences.
Another option is to filter the log file to remove all the non ascii characters and Escape sequences.
Dan Salomon at the Univ of Manitoba in Canada has written a program called SCRIPTFIX which runs on UNIX and supposedly does exactly that. If you ask him nicely he might let you use it.
salomon@ccu.umanitoba.ca
Failing that you can try to pipe your log through
col -bx
cat bpx.log | col -bx >pbxlog.txt
and see if that helps.
Ron
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2003 07:30 AM
01-14-2003 07:30 AM
Re: Editing a commad response to a switch BPX
Setting TERM as unknown didn't work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2003 01:40 PM
01-14-2003 01:40 PM
Re: Editing a commad response to a switch BPX
As a proof of concept I tried a little filtering:
A Terminal Escape Sequence is defined as starting with ESC[ and ending with a letter. I loaded your output into Word since I don't have easy access to an HP right now and did a two step replace since I didn't want to bother looking up the ASCII for a [ and it's hard to search on [ with wild cards turned on.
Replace ^027[
with QQQ
Turn on Use Wild Cards
Replace QQQ*[a-zA-Z]
with
one space
That reduces the output to the basic ascii text without formatting. It starts like this:
Last Command: No User
TRUJBPX BPX 8620 No User 9.2.31 Jan. 10 2003 16:11 GMT Last Command: TN Enter User ID: provision Enter Password:
TRUJBPX BPX 8620 provision:1 9.2.31 Jan. 10 2003 16:11 GMT Last Command: TN Next Command: dspcons This dspcons Local Remote Remote Route Channel NodeName Channel State Type Avoid COS O 1.1.0.32 TRUJBPX 3.1.0.32 Ok ubr 1.1.0.33 TRUJBPX 3.1.0.33 Ok ubr 1.1.0.34 TRUJBPX 3.3.0.32 Ok ubr 1.1.0.35 TRUJBPX 3.3.0.33
Which is a bit hard to read but better than we started with. I then did a few obvious insertions of paragraph marks using the Replace feature and the first table now makes sense: See attachment.
It would be fairly simple to write a Perl script which dropped all of the escape sequences except for those ending in H (these are position indicators) and then went through and formatted the document and removed the H sequences one at a time while putting the words in the right places. Do you have Perl on your system or are you willing to install it?
Ron
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-15-2003 06:50 AM
01-15-2003 06:50 AM
Re: Editing a commad response to a switch BPX
I give an example, the response is like if you were reading a file with more, you need tell the BPX you wanna read the information that follows. But in this case the information on the current window depends of that shown on the last window, although I'm not sure about this.