From: Sergey <a_s_y@sama.ru>
To: "ALT Linux sysadmins' discussion" <sysadmins@lists.altlinux.org>
Subject: Re: [Sysadmins] Чем заменить mii-tool ?
Date: Fri, 20 Sep 2019 15:30:04 +0400
Message-ID: <201909201530.04102.a_s_y@sama.ru> (raw)
In-Reply-To: <201003291601.54824.ledest@gmail.com>
On Monday 29 March 2010, Led wrote:
> > Требует указание DEVICE, когда список ещё неизвестен. В принципе,
> > если найти список чем-то, можно ethtool-у скормить через xargs
> > какой-нибудь. И вывод пограпать...
>
> ls -d /sys/class/net/*
Вспомнилось... Лучше поздно, чем никогда:
-----------------------
#!/bin/sh
for ETH in `ls -d /sys/class/net/*/device | awk -F "/" '{print $5}'`; do
LINK=`ethtool $ETH | grep Link | sed "s/^[[:space:]]*//"`
SPEED=`ethtool $ETH | grep Speed | sed "s/^[[:space:]]*//"`
DUPLEX=`ethtool $ETH | grep Duplex | sed "s/^[[:space:]]*//"`
printf "%-5s: %-18s %-15s %-22s\n" "$ETH" "$LINK" "$SPEED" "$DUPLEX"
done
------------------------
--
С уважением, Сергей.
next prev parent reply other threads:[~2019-09-20 11:30 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-29 12:14 Sergey
2010-03-29 12:20 ` Michael Shigorin
2010-03-29 12:57 ` Sergey
2010-03-29 13:01 ` Led
2010-03-29 18:32 ` Sergey
2010-03-29 18:43 ` Sergey
2019-09-20 11:30 ` Sergey [this message]
2010-03-29 13:07 ` Max Ivanov
2010-03-29 12:20 ` Led
2010-03-30 4:48 ` Андрей Новосёлов
2010-03-30 5:59 ` Sergey
2010-03-30 7:12 ` [Sysadmins] Чем заменить mii-tool? Michael Shigorin
2013-03-25 6:23 ` [Sysadmins] Чем заменить mii-tool ? Sergey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201909201530.04102.a_s_y@sama.ru \
--to=a_s_y@sama.ru \
--cc=sysadmins@lists.altlinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux sysadmins discussion
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/sysadmins/0 sysadmins/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 sysadmins sysadmins/ http://lore.altlinux.org/sysadmins \
sysadmins@lists.altlinux.org sysadmins@lists.altlinux.ru sysadmins@lists.altlinux.com
public-inbox-index sysadmins
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.sysadmins
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git