Re: Checking length of time?

From: Alexis Huxley (ahuxley_at_gmx.net)
Date: 10/18/04

  • Next message: Andrea Vettorello: "Re: iptables - can't locate module ip_tables"
    To: debian-user@lists.debian.org
    Date: Mon, 18 Oct 2004 07:39:13 +0000 (UTC)
    
    

    > 1. How do I check the status of the connection... ie the length of time
    > that my debian box has been connected?

    You can find the last connection time by grepping for "remote IP address"
    in /var/log/messages. Then you can use 'date -d <datestring> +%s' to
    convert this to seconds since 1970, you can also get the time now
    expressed as seconds since 1970 with 'date +%s' then subtract one from
    the other and you've got the number of seconds you've been connected.
    The rest is straightforward.

    > 2. How can I set my box up to automatically disconnect after say about
    > 7.5 hours, and then reconnect?

    Set up a script in /etc/ip-up.d that runs something like:

            #!/bin/sh
            ( sleep 27000; killall ppd ) &

    (Not tested.)

    Hope that helps ..

    Alexis

    -- 
    To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org 
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
    

  • Next message: Andrea Vettorello: "Re: iptables - can't locate module ip_tables"

    Relevant Pages

    • Re: poor performance on first query
      ... > I've got an ASP site querying an Access database to get photo gallery ... If it's the connection time that's the problem, ... This email account is my spam trap so I ...
      (microsoft.public.inetserver.asp.db)
    • Re: Determining the key used to establish an SSH connection
      ... > used to establish a particular SSH connection? ... > At connection time the syslog facility for SSH just seems to log the login ...
      (comp.security.ssh)
    • Re: Connection time TransmitFile
      ... When TransmitFile ends, ... connection ends, the SF_NOTIFY_END_OF_REQUEST and (if the TCP/IP connection ... is terminated) the SF_NOTIFY_END_OF_NET_SESSION notifications are called. ... Could you elaborate more on your concept of "connection time"? ...
      (microsoft.public.vc.mfc)
    • Re: exchange 2003 sbs
      ... On the SBS, open Exchange System Manager. ... On the Delivery Options ... change the Connection Time to Always Run. ... If I click the force connection the mail sent? ...
      (microsoft.public.windows.server.sbs)
    • Oracle 10g Express, 9i Client & Wireless Enet
      ... connection time to the DB. ... connection, which takes just over a minute. ... to do with my wireless network, ... Public Sub New(ByVal User As String, ByVal Password As String, ByVal Source ...
      (microsoft.public.dotnet.framework.adonet)