- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: how to set the terminal
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
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
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
11-05-2013 01:06 AM - last edited on 11-05-2013 05:35 PM by Lisa198503
11-05-2013 01:06 AM - last edited on 11-05-2013 05:35 PM by Lisa198503
Hi:
I want to build the software(wxWight) in the HP UX 11.31, some errors occur.
But the error message is clearly mangled from the terminal, for unknown reasons.
I try to output the message to one document by the command "make >> output.txt", but the error message just is shown on the terminal and won't be written to the document.
I try the maximize the terminal , the message will be more, but still being truncated.
please refer to the compared image.
so, how can I get the entire error message via setting the terminal?
P.S. This thread has been moved from HP-UX-General to languages. -HP Forum Moderator
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-05-2013 01:18 AM
11-05-2013 01:18 AM
Re: how to set the terminal
For redirecting error messages, you need to redirect 'stderr' to your log file.
make >> output.txt 2>error.txt
Or in case you want everything to go into the same log file,
make > output.txt 2>&1
HP-UX Compilers
- Tags:
- redirection
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-05-2013 03:50 PM - edited 11-05-2013 03:54 PM
11-05-2013 03:50 PM - edited 11-05-2013 03:54 PM
Re: how to set the terminal
>> so, how can I get the entire error message via setting the terminal?
Unless you can set the terminal line length to 500 or 1000, you'll never see the entire message on one line. And even if you could set the terminal width that large, you could not read it as the characters would only be a few pixels in size.
You can always pipe the output from make into cut -c 1-79 but then you'll lose the text at the end on the line. That will show each include on one line. When you redirect the output into a file, the lines will be still be very long. If you edit the file, your display problem will be the same as before. You might print the file but rotate the text to landscape mode and reduce the font to get everything on one line (if you can read the small font).
To troubleshoot the make problem, the very long include lines may be useful as reference but the errors appear to be easitly readable. Using vi, you can edit the output file and search for selected text if necessary.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-05-2013 06:36 PM - edited 11-05-2013 07:10 PM
11-05-2013 06:36 PM - edited 11-05-2013 07:10 PM
Re: how to set the terminal
hi Bill Hassell
Unless you can set the terminal line length to 500 or 1000, you'll never see the entire message on one line. And even if you could set the terminal width that large, you could not read it as the characters would only be a few pixels in size.
>> I can't find where to set the line length , I try to set the font to 6,5 point, but the error message still being truncated.
can you kindly tell me how to set the terminal line length to 1000?
You can always pipe the output from make into cut -c 1-79 but then you'll lose the text at the end on the line.
>> sorry, I am stranger to Unix OS. can you describe more in detailed about how to make into cut-c1-79?
E.g:
cut -c 79 output.txt
I think the cut command is used to truncate the file to lower pieces for readable easily. but first I should get the entire message then I can cut the output file to get more clearly fonts
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-05-2013 06:39 PM - edited 11-05-2013 07:10 PM
11-05-2013 06:39 PM - edited 11-05-2013 07:10 PM
Re: how to set the terminal
Hi Soumitra C
Thanks a lot, The error info can be written t to the file now, but the error message still be truncated
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-05-2013 10:01 PM
11-05-2013 10:01 PM
Re: how to set the terminal
Can you please post the contents of the file as an attachment, possibly gzipped?
Thanks!
HP-UX Compilers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2013 06:37 PM - edited 11-06-2013 06:39 PM
11-06-2013 06:37 PM - edited 11-06-2013 06:39 PM
Re: how to set the terminal
>> I can't find where to set the line length , I try to set the font to 6,5 point, but the error message still being truncated.
>> can you kindly tell me how to set the terminal line length to 1000?
You aren't using a typical terminal emulator, you're using Xwindows, probably xterm or dterm. To get 1000 characters across the screen, you need to change the font size about 2 or 3 points. But there is no font that small and even if you could find a font like that, you could not read it on a normal screen.
In other words, you won't be able to see a 1-line message that is more than about 200 characters with xterm or dterm. However, when you redirect the messages into a fail, there is no practical line length limitation so everything is there.
But it is really important to note that the messages are not truncated.
In your first attachment, the last long message starts with: /var/SPS/SPS/wxWidgets
and the end of that line reads: ../src/common/wxcrt.cpp
So everything is there. The very long line is simply folded into 4 lines on your screen. No truncation has occurred.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2013 10:51 PM
11-06-2013 10:51 PM
Re: how to set the terminal
>I can't find where to set the line length
I'm not sure what your problem is? If you have long lines, the lines should be wrapped. You just follow the lines to the logical beginning. Your picture teminal-larger.png 73 KB looks fine.
If you don't like that wrapping, you could open the output in a browser as .txt, then you can scroll from left to right.
>but the error message still be truncated
Not truncated but wrapped.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2013 02:12 AM
11-07-2013 02:12 AM
Re: how to set the terminal
The output will be correct when it is built successfully, but the errors shown in terminal will be truncated when built fail.
please refer to the three pictures, the error info shown in terminal will be different according to the termimal windows size.
But, The error info will be the same if it is writen to the file whenever how to adjust the terminal window.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2013 11:29 AM
11-07-2013 11:29 AM
Re: how to set the terminal
The output.txt file shows that the each message is complete and not truncated. The long messages are folded onto the next several lines. Those extra lines are the original message. If you capture the last long line that starts with:
/var/SPS/SPS/wxWidgets...
and ends with:
../src/common/wxcrt.cpp
The line is 539 characters wide. It is one line and is not truncated. If you have to use Xwindows with HP-UX, you can use dtpad (the text editor from CDE) which should allow horizontal scrolling.
Or you can see the entire line by transferring the file to a PC and open it in Notepad. When you open the file, if you see the lines folded, then click on the Format menu item, and turn off Word Wrap. Now you will see a single line for each message plus a horizontal scroll bar at the bottom that you can slide to the right for the rest of the line.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2013 01:03 PM
11-07-2013 01:03 PM
Re: how to set the terminal
>how to adjust the terminal window.
Hmm, whatever terminal emulator you're using is just broken? The lines seem to be interspersed.
One possibility is that you are getting the stdout and stderr output interspersed.
You need to use:
make ... 2>&1 ...
Note: If an application is writing to both stdout and stderr, it must do something special so that the output looks reasonable. It must flush stdout (since buffered) before it writes to stderr.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2013 01:37 AM
11-08-2013 01:37 AM
Re: how to set the terminal
Hi Dennis:
I try the command : make 2>&1
But it does not work. the error info still be partly.
refer to the attachment
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2013 01:49 AM
11-08-2013 01:49 AM
Re: how to set the terminal
Hi Bill Hassell:
Yes, if the built succeed, the output info starts with:
/var/SPS/SPS/wxWidgets...
and ends with:
../src/common/wxcrt.cpp
but , if the built failed, the error output info starts with:
../src/common/wxcrt.cpp: In function ‘int wxVsscanf(const char*, const char*, void*)’:
this line is intercepted.
you can compare the three pictures as attachment(1.png, 2.png, 3.png), the errors is different according to the terminal window size.
The error line will contain more info when resize the windows to maximize.
The error info will be the same if I input to the file via the command : make >output.txt 2>&1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2013 04:53 AM
11-08-2013 04:53 AM
Re: how to set the terminal
>The error line will contain more info when resize the windows to maximize.
Then your terminal emulator is just broken. Nothing you can do except copy the output to your PC.
I suppose you could try to suppress stdout and just look at stderr:
make 2>&1 > /dev/null
What does "stty -a" show? Perhaps you don't have the XOFF hand shaking?
You should see ixoff and not -ixoff.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2013 08:52 PM
11-08-2013 08:52 PM
SolutionI agree with Dennis, your terminal (which appears to be dterm) is archaic for Unix system administration and programming. If you are using a PC to view the dterm window, time to shutoff Xwindows and use a real terminal emulator. The best is PuTTY and can be downloaded from:
http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
Then as Dennis suggests, your /etc/profile needs to have a proper stty setup.
Replace the stty lines in /etc/profile with these two lines:
stty erase "^H" kill "^U" intr "^C" eof "^D" -parity ixoff stty susp \^Z dsusp \^Y
This will also fix any problems you have had in the past with pasting large amounts of text using vi.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2013 01:19 AM
11-13-2013 01:19 AM
Re: how to set the terminal
Thanks a lot for all the help, but it sees still can not work.
I have edit the /etc/profile and use the putty to make the software.
please refer to attachment "putty.png"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2013 02:42 AM
11-13-2013 02:42 AM
Re: how to set the terminal (CV qualifier mismatch)
>but it sees still can not work.
You need to define what "work" means. It is now correctly printing the error message.
You are illegally trying to call vsscanf passing a const char* to a char*, the output parm.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2013 03:16 AM
11-15-2013 03:16 AM
Re: how to set the terminal (CV qualifier mismatch)
Thanks , Dennis Handly.
I made a mistake, now it works.
Thanks again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2013 10:08 AM
11-15-2013 10:08 AM
Re: how to set the terminal (CV qualifier mismatch)
>Thanks again.
If you're happy with the answers you were given, please click on the Kudos star for each helpful answer.