last use of Port on Catalyst 2950

Discussion in 'Cisco' started by Tobias, Jun 7, 2004.

  1. Tobias

    Tobias Guest

    Hello together,

    I wanted to find out when port x on a catalyst was used last time!!

    any idea?

    so long, tobi
    Tobias, Jun 7, 2004
    #1
    1. Advertising

  2. Tobias

    PJML Guest

    Tobias wrote:
    > Hello together,
    >
    > I wanted to find out when port x on a catalyst was used last time!!
    >
    > any idea?
    >
    > so long, tobi


    Don't think it can be done - unless you're logging
    state-transitions and can work back through the
    logs!
    PJML, Jun 7, 2004
    #2
    1. Advertising

  3. Tobias

    Scooby Guest

    "PJML" <> wrote in message
    news:40c46157$...
    > Tobias wrote:
    > > Hello together,
    > >
    > > I wanted to find out when port x on a catalyst was used last time!!
    > >
    > > any idea?
    > >
    > > so long, tobi

    >
    > Don't think it can be done - unless you're logging
    > state-transitions and can work back through the
    > logs!
    >


    Do a show interface and look at last input/output. These are sometimes
    different and sometimes one will say "never" while the other will have a
    number of days. I've found the last output usually to be the best indicator
    since I'm running spanning tree and there is constantly something going out
    when the interface is up.
    Scooby, Jun 7, 2004
    #3
  4. Hi,

    If you'd like to do it programmatically(?) you can query the following snmp
    oid: .1.3.6.1.2.1.2.2.1.9.ifIndex (ifLastChange).
    According to its documentation:

    "The value of sysUpTime at the time the interface entered
    its current operational state. If the current state was
    entered prior to the last re-initialization of the local
    network management subsystem, then this object contains a
    zero value."

    So the time of its last state-change is: Now - sysUpTime + ifLastChange

    Erik


    "Tobias" <> wrote in message
    news:ca1muq$if5$02$-online.com...
    > Hello together,
    >
    > I wanted to find out when port x on a catalyst was used last time!!
    >
    > any idea?
    >
    > so long, tobi
    >
    >
    Erik Tamminga, Jun 7, 2004
    #4
  5. In article <ca2gch$cq2$1.nb.home.nl>,
    Erik Tamminga <> top-posted:
    :"Tobias" <> wrote in message
    :news:ca1muq$if5$02$-online.com...
    :> I wanted to find out when port x on a catalyst was used last time!!

    :If you'd like to do it programmatically(?) you can query the following snmp
    :eek:id: .1.3.6.1.2.1.2.2.1.9.ifIndex (ifLastChange).
    :According to its documentation:

    :"The value of sysUpTime at the time the interface entered
    :its current operational state.

    In other words, it tells you when the interface last went up or down.
    That doesn't tell you when the interface was last *used*. If someone
    has had a computer sitting connected but unused for 2 years, then the
    ifLastChange is going to show 2 years ago. But then again if someone has
    had a computer sitting connected and actively used for that entire 2 years,
    then the ifLastChange is still going to show 2 years ago.

    There isn't any way I can think of on the 2950 to find out when the last
    I/O on an interface was.
    --
    And the wind keeps blowing the angel / Backwards into the future /
    And this wind, this wind / Is called / Progress.
    -- Laurie Anderson
    Walter Roberson, Jun 7, 2004
    #5
  6. Well, that's true but it depends on what the OP means with "last used". If
    he's trying to find out what cable/patches he can disconnect in order to
    save some ports (how often does it happen that you patch something which
    isn't being used anymore). Then the information about which ports went down
    how many hours/days ago is relevant and can be found using the information I
    specified.
    My idear is that if a port is connected (link-up) it's in use and should not
    be disconnected.

    Erik


    "Walter Roberson" <-cnrc.gc.ca> wrote in message
    news:ca2p0s$9em$...
    > In article <ca2gch$cq2$1.nb.home.nl>,
    > Erik Tamminga <> top-posted:
    > :"Tobias" <> wrote in message
    > :news:ca1muq$if5$02$-online.com...
    > :> I wanted to find out when port x on a catalyst was used last time!!
    >
    > :If you'd like to do it programmatically(?) you can query the following

    snmp
    > :eek:id: .1.3.6.1.2.1.2.2.1.9.ifIndex (ifLastChange).
    > :According to its documentation:
    >
    > :"The value of sysUpTime at the time the interface entered
    > :its current operational state.
    >
    > In other words, it tells you when the interface last went up or down.
    > That doesn't tell you when the interface was last *used*. If someone
    > has had a computer sitting connected but unused for 2 years, then the
    > ifLastChange is going to show 2 years ago. But then again if someone has
    > had a computer sitting connected and actively used for that entire 2

    years,
    > then the ifLastChange is still going to show 2 years ago.
    >
    > There isn't any way I can think of on the 2950 to find out when the last
    > I/O on an interface was.
    > --
    > And the wind keeps blowing the angel / Backwards into the future /
    > And this wind, this wind / Is called / Progress.
    > -- Laurie Anderson
    Erik Tamminga, Jun 9, 2004
    #6
  7. Tobias

    Steve Guest

    On Mon, 7 Jun 2004 14:24:21 +0200, "Tobias" <>
    wrote:

    >Hello together,
    >
    >I wanted to find out when port x on a catalyst was used last time!!
    >
    >any idea?
    >
    >so long, tobi
    >

    Hi Tobi,

    What is it that you want to do? I developed a Web-based thing using
    SNMP, PHP, Apache and MySQL which accepts SNMP LinkUp/Down traps from
    switches and updates a MySQL database with last used date & time stamp
    for each port reported. There's a Web-based front end that allows you
    to see the last used dates for each port on each switch, and you can
    specifiy a maximum period of disuse prior to flagging the port as in
    need of unpatching (for housekeeping).

    Let me know if you want a copy (but please be aware that it's provided
    "as is" without warranty, and you'll need to be able to get Apache up
    and running with PHP, which in turn needs to be configured with MySQL
    support and SNMP support. You'll also need an SNMP trap-receiver
    configured - I use Net-SNMP, and you'll need to set up MySQL)

    Let me know, though

    Steve
    Steve, Jun 16, 2004
    #7
  8. Tobias

    Steve Guest

    On Wed, 9 Jun 2004 19:08:50 +0200, "Erik Tamminga"
    <> wrote:

    >Well, that's true but it depends on what the OP means with "last used". If
    >he's trying to find out what cable/patches he can disconnect in order to
    >save some ports (how often does it happen that you patch something which
    >isn't being used anymore). Then the information about which ports went down
    >how many hours/days ago is relevant and can be found using the information I
    >specified.
    >My idear is that if a port is connected (link-up) it's in use and should not
    >be disconnected.
    >
    >Erik

    <BIG SNIP>

    But if the port is not connected (and hasn't been for 2 weeks), does
    that mean that it should be disconnected, or does it mean that the
    owner is on holiday and comes back tomorrow? If it's not been used in
    a month, is it because it's in a meeting room, or a casual, drop-in
    area?

    Steve
    Steve, Jun 16, 2004
    #8
  9. > But if the port is not connected (and hasn't been for 2 weeks), does
    > that mean that it should be disconnected, or does it mean that the
    > owner is on holiday and comes back tomorrow? If it's not been used in
    > a month, is it because it's in a meeting room, or a casual, drop-in
    > area?
    >
    > Steve


    Well, that's up to the OP.

    Erik
    Erik Tamminga, Jun 17, 2004
    #9
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Pawel
    Replies:
    1
    Views:
    595
  2. ns
    Replies:
    17
    Views:
    9,845
  3. Mikem
    Replies:
    2
    Views:
    1,755
    Hansang Bae
    Nov 24, 2004
  4. Replies:
    4
    Views:
    3,866
    cisco
    Feb 10, 2005
  5. Neddy
    Replies:
    8
    Views:
    1,663
    Doug McIntyre
    May 27, 2009
Loading...

Share This Page