Choose style:

Author Topic: ping default gateway powerline help [Solved]  (Read 179 times)

0 Members and 1 Guest are viewing this topic.

Offline catfish2018

  • nOOb
  • *
  • Posts: 2
  • Karma: 0
  • New Forum User
    • View Profile
  • Peppermint version(s): 9
ping default gateway powerline help [Solved]
« on: July 06, 2018, 08:55:12 am »
Hi I have been try to ping my default gate to keep  powerline adaptors awake
i use the following in ubuntu but does not work in pepermint for me i can not see the process running
in system monitor  how do you do the following in peppermint many thanks cat fish

For Ubuntu:

Go to Startup Applications
Click Add
Enter any Name and in Command: enter ping <address> where <address> is the IP address of your default gateway
Click Add
Log out and then log back in to start the task

new to peppermint  any help would be great catfish
« Last Edit: July 07, 2018, 12:55:08 am by zebedeeboss »

Online PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 20976
  • Karma: 2366
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 8 Respin & 9 Alpha
Re: ping default gateway powerline help
« Reply #1 on: July 06, 2018, 09:09:13 am »
Hi catfish and welcome to the forum

It may be that the ping command is running too early (before the desktop comes up), so putting a delay in the command may help:
Code: [Select]
sleep 10 ; ping <ip.address.of.device>
or maybe:
Code: [Select]
sleep 10 ; bash -c "ping <ip.address.of.device>"
But even it this works it's going to be continually pinging your device for the duration of the session .. to me it feels a bit inefficient and spams the network for no reason.

Surely something like:-
Code: [Select]
ping -c 3 <ip.address.of.device>
run every say 10 minutes as a cron job would be more efficient .. so it just sends 3 pings, waits 10 minutes, then sends another 3, etc.



In the following example, I'm assuming you want to run (as root):
ping -c 3 192.168.1.100
every
10
minutes

Open a terminal and run:
Code: [Select]
sudo crontab -e
scroll to the bottom and add a new line that reads
Code: [Select]
*/10 * * * * ping -c 3 192.168.1.100
save the crontab by hitting these key combos in sequence:-
Ctrl+x
then:-
y
then:-
Enter
that command should now run every 10 minutes.

You can check it by searching the syslog for entries with "CRON" in them:
Code: [Select]
grep CRON /var/log/syslog



Should at any stage you want to remove the crontab entry, either run:
Code: [Select]
sudo crontab -e
and manually remove the entry .. then save.

or

completely remove ALL (root) crontab entries with:
Code: [Select]
sudo crontab -r
« Last Edit: July 06, 2018, 09:51:50 am by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline catfish2018

  • nOOb
  • *
  • Posts: 2
  • Karma: 0
  • New Forum User
    • View Profile
  • Peppermint version(s): 9
Re: ping default gateway powerline help
« Reply #2 on: July 06, 2018, 03:08:42 pm »
Hi PCNetSpec thanks  for  your indepth the help pings working now i checked the systemlog  ping every ten minutes   now powerlines do not drop connection   
      Peppermints  running good on my laptop have a good weekend :)
« Last Edit: July 06, 2018, 03:33:03 pm by catfish2018 »

Online zebedeeboss

  • Global Moderator
  • Veteran
  • *****
  • Posts: 2387
  • Karma: 475
  • Life first... Peppermint a close 2nd :)
    • View Profile
  • Peppermint version(s): Peppermint 9 x64
Re: ping default gateway powerline help [Solved]
« Reply #3 on: July 07, 2018, 12:59:12 am »
Hi catfish2018,

Welcome to the Forum.

Glad to see your problem is resolved.

When you consider a problem fixed could you remember to go to your First post in the thread and click Modify and then add [Solved] to the end of the subject line.  This will help anyone with the same or similar problem find a solution.

I have done it for you on this occasion.

Regards Zeb...
Be Kind Whenever Possible...   It is Always Possible - Dalai Lama

Linux User #565092
P9 x64 Desktop - Intel(R) Core(TM) i7-6700K @ 4.00GHz - 32Gb RAM - NVIDIA GTX1060 6Gb - 43" 4k 3840x2160
x64 Laptop - Intel(R) Core i7-7700HQ @ 2.80GHz - 8Gb RAM - Nvidia GTX1050 4Gb - 15.6" HD 1920x1080