LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Checking if you are online - please help (https://www.linuxquestions.org/questions/linux-newbie-8/checking-if-you-are-online-please-help-136677/)

RedRabbit 01-20-2004 08:09 AM

Checking if you are online - please help
 
Guys, could you please tell me if there is an easy way to check if you are online. I already know about PING, but i want something that i could do without having to ping any host. Can you not just say to your modem ("Are you connected to the internet?").

I am trying to build a bash program to count how long you have been online for.

Any help is appreciated,

Gary.

aaa 01-20-2004 10:24 AM

When the modem connects to the remote modem it says 'CONNECT'. At disconnect (unintentional) it says 'NO CARRIER'. Note that the modem's status does may not indicate whether it's connected to the internet, only if it's connected to something (like another modem, not necessarily to internet) . If you are connected to the internet, pppd is probably running.


All times are GMT -5. The time now is 02:44 PM.