Network interface status: command
Ernie Luzar
luzar722 at gmail.com
Thu Nov 23 14:48:35 UTC 2017
zep wrote:
> On 11/23/2017 09:22 AM, Ernie Luzar wrote:
>> In the daily run status report I see a "Network interface status:"
>> display.
>>
>> What console command is generating it?
>>
> tl;dr -- netstat with a couple options i & d.
>
> I'd never really noticed it; it probably would be helpful to put the
> output just to make sure things are lining up, and rather than just hand
> you what I think is going on, this seems like a good time to teach
> people what little I know of fishing.
> if the email you're seeing is part of a daily run, it's set by the
> system and not something you put in as root user (you can do crontab -l
> as root to verify it's not there), then there's the system cron file in
> /etc/crontab
>
> # Perform daily/weekly/monthly maintenance.
> 1 3 * * * root periodic daily
> 15 4 * * 6 root periodic weekly
> 30 5 1 * * root periodic monthly
>
> that seems like a pretty good suspect, man on 'periodic' -
>
> If an argument is an absolute directory name it is used as is,
> otherwise
> it is searched for under /etc/periodic and any other directories speci-
> fied by the local_periodic setting in periodic.conf(5) (see below).
>
> check the directories
>
> root at nexus:/etc/periodic/daily # ls
> 100.clean-disks 330.news 440.status-mailq
> 110.clean-tmps 400.status-disks 450.status-security
> 120.clean-preserve 401.status-graid 460.status-mail-rejects
> 130.clean-msgs 404.status-zfs 480.leapfile-ntpd
> 140.clean-rwho 406.status-gmirror 480.status-ntpd
> 150.clean-hoststat 407.status-graid3 500.queuerun
> 200.backup-passwd 408.status-gstripe 510.status-world-kernel
> 210.backup-aliases 409.status-gconcat 800.scrub-zfs
> 300.calendar 420.status-network 999.local
> 310.accounting 430.status-rwho
>
> that 420.status-network seems like a good candidate
>
> root at nexus:/etc/periodic/daily # sh -x 420.status-network
>
> ...
>
> + echo 'Network interface status:'
> Network interface status:
> + flags=-d
> + netstat -i -d
> Name Mtu Network Address Ipkts Ierrs Idrop
> Opkts Oerrs Coll Drop
> em0 1500 <Link#1> XXX 22874340 0 0 574773 0
> 0 0
> em0 - 192.168.XX.0/ nexus 1172609 - -
> 540898 - - -
> lo0 16384 <Link#2> 3749 0 0
> 3749 0 0 0
> lo0 - localhost ::1 0 - -
> 0 - - -
> lo0 - fe80::1%lo0 fe80::1%lo0 0 - -
> 0 - - -
> lo0 - your-net localhost 3749 - -
> 3749 - - -
> + rc=0
>
> and I think you'd find that's a decent match for what you get in your email.
>
> ...
>
>
Thank you for the info.
netstat -i -d is what I was looking for.
More information about the freebsd-questions
mailing list