Ping failure monitorOpenVPN, 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

My professor has told me he will be the corresponding author. Will it hurt my future career?

How should I ask for a "pint" in countries that use metric?

Function that detects repetitions

force:lightningQuickAction . Will implementing this open the component as modalpop up directly?

Category-theoretic treatment of diffs, patches and merging?

Why is whale hunting treated differently from hunting other animals?

What does the multimeter dial do internally?

When is one 'Ready' to make Original Contributions to Mathematics?

What's the difference between a type and a kind?

Was the 45.9°C temperature in France in June 2019 the highest ever recorded in France?

What do you call a situation where you have choices but no good choice?

How to have a filled pattern

How to deal with account scam and fraud?

What exactly is a "murder hobo"?

How many Jimmys can fit?

QR codes, do people use them?

Where are the Wazirs?

Why do airports remove/realign runways?

What is the shape of the upper boundary of water hitting a screen?

Why SQL does not use the indexed view?

Which is a better conductor, a very thick rubber wire or a very thin copper wire?

What was the significance of Spider-Man: Far From Home being an MCU Phase 3 film instead of a Phase 4 film?

Can a wizard use the spell Levitate on a target and shoot him with attacking spells that don't require concentration?

Need a non-volatile memory IC with near unlimited read/write operations capability



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;








1















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!










share|improve this question






















  • 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

















1















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!










share|improve this question






















  • 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













1












1








1








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!










share|improve this question














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






share|improve this question













share|improve this question











share|improve this question




share|improve this question










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

















  • 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










2 Answers
2






active

oldest

votes


















2














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 () egrep -q 'UP,LOWER_UP.* state UP'
if [[ $? -eq 0 ]] ; then
echo "UP"
else
echo "DOWN"
fi






share|improve this answer






























    0














    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 -...





    share|improve this answer



























      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
      );



      );













      draft saved

      draft discarded


















      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









      2














      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 () egrep -q 'UP,LOWER_UP.* state UP'
      if [[ $? -eq 0 ]] ; then
      echo "UP"
      else
      echo "DOWN"
      fi






      share|improve this answer



























        2














        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 () egrep -q 'UP,LOWER_UP.* state UP'
        if [[ $? -eq 0 ]] ; then
        echo "UP"
        else
        echo "DOWN"
        fi






        share|improve this answer

























          2












          2








          2







          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 () egrep -q 'UP,LOWER_UP.* state UP'
          if [[ $? -eq 0 ]] ; then
          echo "UP"
          else
          echo "DOWN"
          fi






          share|improve this answer













          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 () egrep -q 'UP,LOWER_UP.* state UP'
          if [[ $? -eq 0 ]] ; then
          echo "UP"
          else
          echo "DOWN"
          fi







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 8 hours ago









          waltinatorwaltinator

          23.6k7 gold badges42 silver badges72 bronze badges




          23.6k7 gold badges42 silver badges72 bronze badges























              0














              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 -...





              share|improve this answer





























                0














                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 -...





                share|improve this answer



























                  0












                  0








                  0







                  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 -...





                  share|improve this answer















                  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 -...






                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited 7 hours ago

























                  answered 7 hours ago









                  guillermo chamorroguillermo chamorro

                  1939 bronze badges




                  1939 bronze badges



























                      draft saved

                      draft discarded
















































                      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.




                      draft saved


                      draft discarded














                      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





















































                      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







                      Popular posts from this blog

                      Invision Community Contents History See also References External links Navigation menuProprietaryinvisioncommunity.comIPS Community ForumsIPS Community Forumsthis blog entry"License Changes, IP.Board 3.4, and the Future""Interview -- Matt Mecham of Ibforums""CEO Invision Power Board, Matt Mecham Is a Liar, Thief!"IPB License Explanation 1.3, 1.3.1, 2.0, and 2.1ArchivedSecurity Fixes, Updates And Enhancements For IPB 1.3.1Archived"New Demo Accounts - Invision Power Services"the original"New Default Skin"the original"Invision Power Board 3.0.0 and Applications Released"the original"Archived copy"the original"Perpetual licenses being done away with""Release Notes - Invision Power Services""Introducing: IPS Community Suite 4!"Invision Community Release Notes

                      Canceling a color specificationRandomly assigning color to Graphics3D objects?Default color for Filling in Mathematica 9Coloring specific elements of sets with a prime modified order in an array plotHow to pick a color differing significantly from the colors already in a given color list?Detection of the text colorColor numbers based on their valueCan color schemes for use with ColorData include opacity specification?My dynamic color schemes

                      Ласкавець круглолистий Зміст Опис | Поширення | Галерея | Примітки | Посилання | Навігаційне меню58171138361-22960890446Bupleurum rotundifoliumEuro+Med PlantbasePlants of the World Online — Kew ScienceGermplasm Resources Information Network (GRIN)Ласкавецькн. VI : Літери Ком — Левиправивши або дописавши її