- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm reporting a frustrating problem in Intel VTune Profiler - the Application Output window only shows standard output (stdout), not standard error (stderr). It can be reproduced by writing a C program like this:
#include <stdio.h>
int main(void)
{
fprintf(stderr, "VTune cannot capture this message!\n");
return 0;
}
The message never shows up in "Application Output", at least not in "Remote Linux (SSH)" mode.
This severely affects developer experience: Whenever VTune is used, one must modify and recompile the code to redirect stderr to stdout, otherwise some errors messages are never captured.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I installed VTune on the remote server and started it in Web mode, using the following command:
~/intel/oneapi/vtune/2024.1/bin64/vtune-backend --web-port 8080 --enable-server-profiling
And yes, I can confirm that Web mode can correctly capture stderr messages.
Thanks for introducing me to VTune's Web mode. It's extremely useful for server development.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am not sure I understand your question correctly. Below is my test result based on your sample code. You can see there is a message output when running the VTune command line remotely.
yuzhang3@yuzhang3-10710:~/workspace/test/print-err$ vtune -collect uarch-exploration -- ./test
vtune: Warning: To enable hardware event-based sampling, VTune Profiler has disabled the NMI watchdog timer. The watchdog timer will be re-enabled after collection completes.
vtune: Collection started. To stop the collection, either press CTRL-C or enter from another console window: vtune -r /home/yuzhang3/workspace/test/print-err/r001ue -command stop.
VTune cannot capture this message!
vtune: Collection stopped.
vtune: Using result path `/home/yuzhang3/workspace/test/print-err/r001ue'
vtune: Executing actions 19 % Resolving module symbols
vtune: Warning: Cannot locate file `vmlinux'.
vtune: Executing actions 19 % Resolving information for `vmlinux'
vtune: Warning: Cannot locate debugging information for the Linux kernel. Source-level analysis will not be possible. Function-level analysis will be limited to kernel symbol tables. See the Enabling Linux Kernel Analysis topic in the product online help for instructions.
vtune: Executing actions 75 % Generating a report Elapsed Time: 0.005s
| Application execution time is too short. Metrics data may be unreliable.
| Consider reducing the sampling interval or increasing your application
| execution time.
|
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The problem is vtune-gui, not the command-line vtune - which is obiviously not affected (because any CLI program launched within a console prints directly to that console, so it's always displayed regardless of whether VTune can capture it).
To reproduce, first, enable the console logging:
- Launch vtune-gui
- Click the Setting icon at the bottom left
- Set Application Output Destination: Product Output Window
- Check Display Verbose Messages in the Collection Log Window
Then,
- Click Configure Analysis
- Select Where: Remote Linux (SSH)
- Select What: Enter Application Path
- Click Start
Now, during an analysis, the black console output window will be shown at the bottom of the screen at the bottom of the VTune window (see screenshot), If it doesn't show up, click the "four dots" icon to enable it. However, only stdout will be displayed, anything printed to stderr will not be displayed. I haven't tested if local applications have the same problem as I only profile remote applications, but I strongly suspect both are problematic.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, I can reproduce the issue and investigate.
If you need stderr output, you can set up a web server following the steps below. This can support application output (stdout and stderr)
VTune web server:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Did you try with a web server, if it can work? Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I installed VTune on the remote server and started it in Web mode, using the following command:
~/intel/oneapi/vtune/2024.1/bin64/vtune-backend --web-port 8080 --enable-server-profiling
And yes, I can confirm that Web mode can correctly capture stderr messages.
Thanks for introducing me to VTune's Web mode. It's extremely useful for server development.
![](/skins/images/71A9511A625CE5D5D45FB59952A4AA71/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page