![]() |
last use of Port on Catalyst 2950
Hello together,
I wanted to find out when port x on a catalyst was used last time!! any idea? so long, tobi |
Re: last use of Port on Catalyst 2950
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! |
Re: last use of Port on Catalyst 2950
"PJML" <pjml@nerc.ac.uk.loopback> wrote in message
news:40c46157$1@news.nwl.ac.uk... > 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. |
Re: last use of Port on Catalyst 2950
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" <milla.killa@gmx.de> wrote in message news:ca1muq$if5$02$1@news.t-online.com... > Hello together, > > I wanted to find out when port x on a catalyst was used last time!! > > any idea? > > so long, tobi > > |
Re: last use of Port on Catalyst 2950
In article <ca2gch$cq2$1@news1.tilbu1.nb.home.nl>,
Erik Tamminga <newsgroups@NeOtammiSnPgAaM.nl> top-posted: :"Tobias" <milla.killa@gmx.de> wrote in message :news:ca1muq$if5$02$1@news.t-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 :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. 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 |
Re: last use of Port on Catalyst 2950
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" <roberson@ibd.nrc-cnrc.gc.ca> wrote in message news:ca2p0s$9em$1@canopus.cc.umanitoba.ca... > In article <ca2gch$cq2$1@news1.tilbu1.nb.home.nl>, > Erik Tamminga <newsgroups@NeOtammiSnPgAaM.nl> top-posted: > :"Tobias" <milla.killa@gmx.de> wrote in message > :news:ca1muq$if5$02$1@news.t-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 > :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. > > 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 |
Re: last use of Port on Catalyst 2950
On Mon, 7 Jun 2004 14:24:21 +0200, "Tobias" <milla.killa@gmx.de>
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 |
Re: last use of Port on Catalyst 2950
On Wed, 9 Jun 2004 19:08:50 +0200, "Erik Tamminga"
<newsgroups@NeOtammiSnPgAaM.nl> 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 |
Re: last use of Port on Catalyst 2950
> 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 |
| All times are GMT. The time now is 05:19 AM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.