Ping failure monitorOpenVPN, Server 12.04, connect to machines in home LAN behind VPN serverx230 tablet ,...
What does "spinning upon the shoals" mean?
What is the highest level of accuracy in motion control a Victorian society could achieve?
How to have a filled pattern
How do I explain that I don't want to maintain old projects?
My professor has told me he will be the corresponding author. Will it hurt my future career?
Does anyone have a method of differentiating informative comments from commented out code?
Examples of fluid (including air) being used to transmit digital data?
Tesco's Burger Relish Best Before End date number
Sorting a list according to some pre-specified rules
How can I reset Safari when Safari is broken?
How was the website able to tell my credit card was wrong before it processed it?
What is this burst transmission sequence across the entire band?
How can I use my cell phone's light as a reading light?
How to deal with account scam and fraud?
Is this car delivery via Ebay Motors on Craigslist a scam?
Can a wizard use the spell Levitate on a target and shoot him with attacking spells that don't require concentration?
Is it ok for parents to kiss and romance with each other while their 2- to 8-year-old child watches?
What does "frozen" mean (e.g. for catcodes)?
What are the effects of abstaining from eating a certain flavor?
Who goes first? Person disembarking bus or the bicycle?
Can you create a free-floating MASYU puzzle?
Need a non-volatile memory IC with near unlimited read/write operations capability
I'm feeling like my character doesn't fit the campaign
Ping failure monitor
Ping failure monitor
OpenVPN, Server 12.04, connect to machines in home LAN behind VPN serverx230 tablet , realtek 8192ce connects to router but no internet12.04 - Extra default route breaks internetip netns monitor not working in a scriptWifi connected but no internet access (Lubuntu 14.04)Ubuntu machine not responding to ping from Windows machine on same network -2Ping yes, Internet noUbuntu server 16.04 can't ping outside IP's or domains or do updatesPC (Ubuntu 18.04.01 Server Edition) and laptop (VMware Ubuntu 18.04.01 Server Edition) linked via cable: ping works only one-wayCan't ping my ubuntu 18.04 from Windows machines using FQDN
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
the network frequently fails and I would like to monitor the output. I tried to makeshift a command like:
ping www.google.fr | while read pong; do echo "$(date): $pong"; done 1>/dev/null && 2> ~/ping_err.log
but the STDERR is still redirected to STDOUT instead ping_err.log
note:
I want only STDERR in the file (not 2>&1)
Thanks!
networking
add a comment |
the network frequently fails and I would like to monitor the output. I tried to makeshift a command like:
ping www.google.fr | while read pong; do echo "$(date): $pong"; done 1>/dev/null && 2> ~/ping_err.log
but the STDERR is still redirected to STDOUT instead ping_err.log
note:
I want only STDERR in the file (not 2>&1)
Thanks!
networking
I can't test it right now, but shouldn't it work if you omit the&&
?
– danzel
8 hours ago
actually, the && was added but the stderr is still on the screen
– Brad Thompson
8 hours ago
add a comment |
the network frequently fails and I would like to monitor the output. I tried to makeshift a command like:
ping www.google.fr | while read pong; do echo "$(date): $pong"; done 1>/dev/null && 2> ~/ping_err.log
but the STDERR is still redirected to STDOUT instead ping_err.log
note:
I want only STDERR in the file (not 2>&1)
Thanks!
networking
the network frequently fails and I would like to monitor the output. I tried to makeshift a command like:
ping www.google.fr | while read pong; do echo "$(date): $pong"; done 1>/dev/null && 2> ~/ping_err.log
but the STDERR is still redirected to STDOUT instead ping_err.log
note:
I want only STDERR in the file (not 2>&1)
Thanks!
networking
networking
asked 8 hours ago
Brad ThompsonBrad Thompson
488 bronze badges
488 bronze badges
I can't test it right now, but shouldn't it work if you omit the&&
?
– danzel
8 hours ago
actually, the && was added but the stderr is still on the screen
– Brad Thompson
8 hours ago
add a comment |
I can't test it right now, but shouldn't it work if you omit the&&
?
– danzel
8 hours ago
actually, the && was added but the stderr is still on the screen
– Brad Thompson
8 hours ago
I can't test it right now, but shouldn't it work if you omit the
&&
?– danzel
8 hours ago
I can't test it right now, but shouldn't it work if you omit the
&&
?– danzel
8 hours ago
actually, the && was added but the stderr is still on the screen
– Brad Thompson
8 hours ago
actually, the && was added but the stderr is still on the screen
– Brad Thompson
8 hours ago
add a comment |
2 Answers
2
active
oldest
votes
Rather than answer your stderr
redirection question, I'll suggest a better (IMHO) way:
In https://github.com/waltinator/net-o-matic.git
- Watch for (WiFi) network going down, then do a user-specified thing to fix it.
There's a way to monitor your connection:
ip monitor address |
egrep --line-buffered
'^Deleted [[:digit:]]+: [[:alnum:]]+[[:space:]]+inet[[:space:]].* scope global ' |
while read line ; do
...
My net-o-matic
script also contains a way to ask once:
function netstate () {
# Return network state as "UP" or "DOWN"
#Adjust how you decide net is UP/DOWN
ip link show | egrep -q 'UP,LOWER_UP.* state UP'
if [[ $? -eq 0 ]] ; then
echo "UP"
else
echo "DOWN"
fi
}
add a comment |
Using your code, this seems to work:
$ ping www.google.fr 2>&1 > /dev/null | while read pong; do echo "$(date): $pong" ; done 2>&1 > ping_err.log
[no output]
$ cat ping_err.log
vie jul 5 15:56:09 -03 2019: ping: sendmsg: La red es inaccesible
vie jul 5 15:56:10 -03 2019: ping: sendmsg: La red es inaccesible
vie jul 5 15:56:11 -...
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1156228%2fping-failure-monitor%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Rather than answer your stderr
redirection question, I'll suggest a better (IMHO) way:
In https://github.com/waltinator/net-o-matic.git
- Watch for (WiFi) network going down, then do a user-specified thing to fix it.
There's a way to monitor your connection:
ip monitor address |
egrep --line-buffered
'^Deleted [[:digit:]]+: [[:alnum:]]+[[:space:]]+inet[[:space:]].* scope global ' |
while read line ; do
...
My net-o-matic
script also contains a way to ask once:
function netstate () {
# Return network state as "UP" or "DOWN"
#Adjust how you decide net is UP/DOWN
ip link show | egrep -q 'UP,LOWER_UP.* state UP'
if [[ $? -eq 0 ]] ; then
echo "UP"
else
echo "DOWN"
fi
}
add a comment |
Rather than answer your stderr
redirection question, I'll suggest a better (IMHO) way:
In https://github.com/waltinator/net-o-matic.git
- Watch for (WiFi) network going down, then do a user-specified thing to fix it.
There's a way to monitor your connection:
ip monitor address |
egrep --line-buffered
'^Deleted [[:digit:]]+: [[:alnum:]]+[[:space:]]+inet[[:space:]].* scope global ' |
while read line ; do
...
My net-o-matic
script also contains a way to ask once:
function netstate () {
# Return network state as "UP" or "DOWN"
#Adjust how you decide net is UP/DOWN
ip link show | egrep -q 'UP,LOWER_UP.* state UP'
if [[ $? -eq 0 ]] ; then
echo "UP"
else
echo "DOWN"
fi
}
add a comment |
Rather than answer your stderr
redirection question, I'll suggest a better (IMHO) way:
In https://github.com/waltinator/net-o-matic.git
- Watch for (WiFi) network going down, then do a user-specified thing to fix it.
There's a way to monitor your connection:
ip monitor address |
egrep --line-buffered
'^Deleted [[:digit:]]+: [[:alnum:]]+[[:space:]]+inet[[:space:]].* scope global ' |
while read line ; do
...
My net-o-matic
script also contains a way to ask once:
function netstate () {
# Return network state as "UP" or "DOWN"
#Adjust how you decide net is UP/DOWN
ip link show | egrep -q 'UP,LOWER_UP.* state UP'
if [[ $? -eq 0 ]] ; then
echo "UP"
else
echo "DOWN"
fi
}
Rather than answer your stderr
redirection question, I'll suggest a better (IMHO) way:
In https://github.com/waltinator/net-o-matic.git
- Watch for (WiFi) network going down, then do a user-specified thing to fix it.
There's a way to monitor your connection:
ip monitor address |
egrep --line-buffered
'^Deleted [[:digit:]]+: [[:alnum:]]+[[:space:]]+inet[[:space:]].* scope global ' |
while read line ; do
...
My net-o-matic
script also contains a way to ask once:
function netstate () {
# Return network state as "UP" or "DOWN"
#Adjust how you decide net is UP/DOWN
ip link show | egrep -q 'UP,LOWER_UP.* state UP'
if [[ $? -eq 0 ]] ; then
echo "UP"
else
echo "DOWN"
fi
}
answered 8 hours ago
waltinatorwaltinator
23.6k7 gold badges42 silver badges72 bronze badges
23.6k7 gold badges42 silver badges72 bronze badges
add a comment |
add a comment |
Using your code, this seems to work:
$ ping www.google.fr 2>&1 > /dev/null | while read pong; do echo "$(date): $pong" ; done 2>&1 > ping_err.log
[no output]
$ cat ping_err.log
vie jul 5 15:56:09 -03 2019: ping: sendmsg: La red es inaccesible
vie jul 5 15:56:10 -03 2019: ping: sendmsg: La red es inaccesible
vie jul 5 15:56:11 -...
add a comment |
Using your code, this seems to work:
$ ping www.google.fr 2>&1 > /dev/null | while read pong; do echo "$(date): $pong" ; done 2>&1 > ping_err.log
[no output]
$ cat ping_err.log
vie jul 5 15:56:09 -03 2019: ping: sendmsg: La red es inaccesible
vie jul 5 15:56:10 -03 2019: ping: sendmsg: La red es inaccesible
vie jul 5 15:56:11 -...
add a comment |
Using your code, this seems to work:
$ ping www.google.fr 2>&1 > /dev/null | while read pong; do echo "$(date): $pong" ; done 2>&1 > ping_err.log
[no output]
$ cat ping_err.log
vie jul 5 15:56:09 -03 2019: ping: sendmsg: La red es inaccesible
vie jul 5 15:56:10 -03 2019: ping: sendmsg: La red es inaccesible
vie jul 5 15:56:11 -...
Using your code, this seems to work:
$ ping www.google.fr 2>&1 > /dev/null | while read pong; do echo "$(date): $pong" ; done 2>&1 > ping_err.log
[no output]
$ cat ping_err.log
vie jul 5 15:56:09 -03 2019: ping: sendmsg: La red es inaccesible
vie jul 5 15:56:10 -03 2019: ping: sendmsg: La red es inaccesible
vie jul 5 15:56:11 -...
edited 8 hours ago
answered 8 hours ago
guillermo chamorroguillermo chamorro
1939 bronze badges
1939 bronze badges
add a comment |
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1156228%2fping-failure-monitor%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
I can't test it right now, but shouldn't it work if you omit the
&&
?– danzel
8 hours ago
actually, the && was added but the stderr is still on the screen
– Brad Thompson
8 hours ago