Questions tagged [stderr]
The stderr tag has no usage guidance.
43
questions
1
vote
1
answer
40
views
how to see the verbose output of a process that is running that writes to a file (shred)
I am running the shred command to securely wipe some storage.
I would like to see its progress, but have lost the ssh terminal that was running the command.
Is there a way that I can use to see the ...
0
votes
0
answers
15
views
assign result and status code from wget to variables
Can I get the response and status code and assign them to variables?
# wget https://www.google.com --quiet --server-response 1> >(body=$(</dev/stdin)) 2> >(grep HTTP | awk '{print $2}' |...
0
votes
0
answers
207
views
Docker doesn't show information on STDERR
I am trying to send the apache error logs to STDERR inside a docker container.
Here's my site-config.conf file regarding the logs:
<VirtualHost *:8008>
ErrorLog ${APACHE_LOG_DIR}/test_error....
5
votes
2
answers
15k
views
What is the meaning of the "/dev/null 2>&1" in a Cronjob entry?
Can someone explain to me what is the meaning of "2>&1" doing here in the below cron job
0 23 * * * wget -q -O /dev/null "https://example.com/index.php" > /dev/null 2>&...
0
votes
1
answer
291
views
Linux shell: Pipe stderr and stdout to one file AND to individual files at the same time (using tee?)
I would like to form a pipe-stream that captures stdout to one file and stderr to another file AND both in a third file (so also the complete terminal output is in one file)
somehow like this:
process ...
0
votes
2
answers
622
views
How to suppress `gcloud compute firewall-rules update` output when there are no errors?
I have a bash script running as cron job which has some gcloud commands in it.
eg.
gcloud compute firewall-rules update allow-ssh--source-ranges=$(echo "${mylocations[@]}" | tr ' ' ',')
I ...
0
votes
1
answer
1k
views
Unable to write to `stderr` or `stdout` from Kubernetes pod to pod logs
I'm trying to debug why my application logs aren't being picked up by Promtail for ingestion into Loki.
In order to exclude the complexities of my PHP application logging being the culprit, I'm ...
1
vote
1
answer
162
views
No timestamp on standard error
Using fping and redirecting stout and stderr to the same file.
fping -lDf IPlist >IPoutput 2>&1
The "host unreachable" error messages in the file have no timestamps.
How do I get ...
-1
votes
1
answer
102
views
stdout and stderr from bash execution to other machine?
Is it possible to send stderr or stdout from a linux machine to ubuntu linux machine using at best wget or other common package at worse ( hopefully not ssh access ) ?
So far i can find a way to "...
5
votes
1
answer
2k
views
nginx logs php-fpm's stderr output cut off at seemingly random positions
Ever since I started using a PHP library that produces a long call chain it's been increasingly difficult to debug issues caused by it because my error logs end up containing output like this: (some ...
0
votes
2
answers
2k
views
Capture outputs with bash to log it and alert user
I am modifying a backup script to save multiple servers with multiple services and different configurations using bash on an Ubuntu server.
I save outputs from commands into a log file and sent these ...
0
votes
2
answers
2k
views
how to save stderr and stdout to a file in ubuntu
when i run
echo "invalid crt" | openssl x509 -noout -modulus | openssl md5 &>> error.log
this show below error
unable to load certificate
139903857870496:error:0906D06C:PEM routines:...
2
votes
1
answer
3k
views
tail /dev/stderr from errors within supervisord php cli script
To make this simple, I want to know if it's possible to access the STDERR like a channel. I don't want the data to log to a file and then tail the file because the amount of information that I want to ...
-1
votes
1
answer
854
views
autostart rc.local 2>&1 redirect, 'open /dev/tty: No such device or address'
I'm trying to execute this command with rc.local:
wget http://address/file -P /root/ 2>&1 | stdbuf -o0 awk '/[.] +[0-9][0-9]?[0-9]?%/ { print substr($0,63,3) }' | whiptail --gauge "Progress" 6 ...
0
votes
1
answer
602
views
Where does cron store the real-time stderr logs?
I've got a cron job configured to run a command like
some-command 2>&1 >/dev/null | tee -a /tmp/some-command.STDERR.$(date +\%Y-\%m-\%d.\%H.\%M)
I've also got a tmpreaper cron job that ...
3
votes
2
answers
3k
views
logging/capturing STDERR/STDOUT on Amazon EC2
I'm looking for a solution that would allow me to automatically capture the STDOUT/STDERR of a process running on Amazon EC2, and send it (remotely) to another server.
Sound simple, except:
I will ...
3
votes
1
answer
2k
views
SNMP error reporting to stdout
Why does net-snmp after "No Such Object available on this agent at this OID" errors exit with 0 and print the error message to STDOUT while other errors are printed to STDERR and have an exit status 1?...
254
votes
5
answers
554k
views
How to see stdout of ansible commands?
How do I see stdout for ansible-playbook commands? -v only shows ansible output, not the individual commands. It would be great if I could figure out how to do this immediately, so if something ...
4
votes
1
answer
947
views
On Apache2/mod_perl2, stderr output doesn't go to logfile nominated by ErrorLog
I like to maintain separate Apache2 logfiles for each of my named virtual hosts, like this:
<VirtualHost *:80>
ServerName myhost.example.com
ErrorLog /var/log/apache2/myhost-error.log
</...
3
votes
2
answers
3k
views
Null bytes in a file created by 2> rotated with logrotate?
I'm using the script utility to record terminal sessions, and using logrotate (with copytruncate, script ignores HUP and keeps writing to the rotated file otherwise) to periodically upload chunks of ...
0
votes
1
answer
2k
views
Can't redirect STDERR or STDOUT to file
I have application written in Go language and it runs in screen
(I do not think problem relates to Go language. I believe it uses STDOUT and STDERR)
screen -S log_server -d -m go run log_server.go 2 &...
7
votes
4
answers
1k
views
Should a foreground program invoked by a daemon split logging between stderr and stdout based on severity levels?
Usually log messages are written to stderr. I'm wondering if it is a good idea/practice to split log messages so that errors and warnings go to stderr while debug/informational/notice messages go to ...
0
votes
1
answer
927
views
IIS7 and PHP: Show error messages with all the rest of the output
Okay, this is slowly getting annoying. I'm used to work with Apache Webservers and never had any of these problems. IIS seems to try to be intelligent - or whatever.
Here's my situation: My customer ...
3
votes
1
answer
675
views
Write stderror to a file using PowerShell
How do I capture error messages from a PowerShell-launched command in a text file?
I searched the Internet for a while and found that supposedly, I should be able to do something like ""C:\UniServer\...
10
votes
4
answers
9k
views
Is there anyway to get msiexec to echo to stdout instead of logging to a file
As part of a continuous delivery pipeline I'd like to install an msi on a given machine. msiexec plus psexec does this perfectly, but it seems that msiexec can only log to a file and I need it to log ...
1
vote
1
answer
1k
views
How to remove the hint in the terminal?
As a normal user , when I run some command like ps\netstat, the terminal hint me:
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see ...
0
votes
2
answers
4k
views
How to make SCP on Linux output "success" to stdout instead of stderr?
We have a cron job that sends stuff to another company using SCP. The command look like this:
10 0 * * * ssh USER@LOCAL-SERVER 'scp -q ~/some/dir/* REMOTE_SERVER:/other/dir/' >> ~/log/some.log
...
2
votes
2
answers
5k
views
Windows cmd stderr redirection to stdout while keeping output to stderr?
Is there a way in Windows 7 cmd shell to redirect the stderr to stdout while keeping the stderr stream intact?
For example, I have a program that outputs to stderr and stdout the following message
...
2
votes
2
answers
220
views
Redirect STDERR separately for the shell and the program
I'm doing some audit automation, this example describes checking the version of Java, even though other programs do the same thing.
The output of "java -version" goes to STDERR, which is easily ...
3
votes
1
answer
2k
views
Forcing command on ssh's authorized_keys merges STDOUT and STDERR
I've been working to have a script in a centralized server to do some things and output a .tar.gz file (see redirect temporarily STDOUT to another file descriptor, but still to screen). I also have ...
1
vote
1
answer
742
views
stdout, stderr, and what else? (going insane parsing slapadd output)
I am using slapadd to restore a backup. That backup contains 45k entries which takes a while to restore so I need to get some progress update from slapadd. Luckily for me there is the -v switch which ...
11
votes
2
answers
36k
views
Completely silent robocopy
I'm trying to robocopy some files silently. Right now, I have robocopy putting everything into a log file, which is fine, but after it finished, Log File: C:\<logfiledestination> is printed. My ...
1
vote
1
answer
412
views
Does STDERR go to syslog in an LSB init script?
I am running a Debian system and have an init script in /etc/init.d/ that starts a daemon using start-stop-daemon:
start-stop-daemon --start --quiet --pidfile /tmp/myproject.pid --exec /usr/bin/...
1
vote
3
answers
4k
views
Redirect cronjob STDOUT and STDERR to /dev/null not working
I'm baffled as to why this isn't working.
I've tried redirecting STDOUT and STDERR using "&>" and also "2>&1" and neither seems to work. I still get e-mailed by this cron job (every minute!) ...
2
votes
1
answer
738
views
CentOS 5.3, Perl, bash commands, Hide ALL output to screen
I am running the following command:
[user@server ~]$ /usr/sbin/ntpdate -d IPREMOVEDFORSECURITY | egrep 'transmit timestamp' | tail -1 | awk '{print $4, $5, $6, $7, $8}'
host found : ...
1
vote
1
answer
3k
views
Howto get exit code of a script started in screen session
I am currently creating a backup script which uses screen to start a backup job with rsync inside a screen session.
The backup jobs are started as follows.
screen -dmS backup /usr/bin/rsync ...
As ...
7
votes
2
answers
8k
views
Start Sinatra app in the background with stdout and stderr redirected (append) to a file
I have a Sinatra app which I run on my local machine using ruby app.rb. While deploying it on a remote machine via ssh, how do I run it in background and redirect stdout and stderr to a log file?
On ...
21
votes
2
answers
21k
views
tar: kill the error message: 'tar: Removing leading `/' from member names'
I run this from a cronjob:
tar -czvf /var/backups/svn.tgz /var/svn/*
That generates this on stderr:
tar: Removing leading `/' from member names
I would like to avoid this because it is not a real ...
0
votes
1
answer
610
views
Suppress EXT3-fs warning on mount
I am familiar with output suppress on Unix machines, ie:
cat /file/that/doesnt/exist > /dev/null 2>&
However I can't seem to suppress the output of mount when an ext3 filesystem is mounted ...
15
votes
4
answers
33k
views
How can I capture output from LFTP? (Output not written to STDOUT or STDERR?)
I would like get access to progress information from lftp. Currently, I'm using curl like so:
curl http://example.com/file -o file -L 2> download.log
This writes curl's progress information to ...
28
votes
4
answers
25k
views
How to pipe stderr without piping stdout
How do I pipe the standard error stream without piping the standard out stream?
I know this command works, but it also writes the standard out.
Command 2>&1 | tee -a $LOG
How do I get just ...
162
votes
11
answers
65k
views
bash: print stderr in red color
Is there a way to make bash display stderr messages in red color?
0
votes
3
answers
362
views
Unix: Delayed stderr display
Is there a way to display errors summary (from stderr) after an application has finished?
E.g. rsync with "--progress" displays LOTS of data, including errors. But when it finishes - it just says "...