From owner-freebsd-questions@freebsd.org Thu Nov 23 14:48:35 2017 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 592F4DEEABE for ; Thu, 23 Nov 2017 14:48:35 +0000 (UTC) (envelope-from luzar722@gmail.com) Received: from mail-it0-x243.google.com (mail-it0-x243.google.com [IPv6:2607:f8b0:4001:c0b::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 164266E28A for ; Thu, 23 Nov 2017 14:48:35 +0000 (UTC) (envelope-from luzar722@gmail.com) Received: by mail-it0-x243.google.com with SMTP id n134so10523164itg.3 for ; Thu, 23 Nov 2017 06:48:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-transfer-encoding; bh=niyoVVrkCnZtHySN9SNa70Bo/OYxr8rAsawwwnDT+SQ=; b=XymWBbUHKaDg/CiXLy0pX06f4e88O046fQgc2APZ5cHAM336v9z4KIlZsTLiJyTrqu Y6guzSPdx5oQIEPqdvgIIKcSUgmKGNVJkUr+xm72wxdFqevP6KA13Mx1p++uB9eZxr/e MDK1vBivQvzDsdnU2U5YzAExRxpWBnVoUqVp4RJeDAL7FRSJc8pSxJzYnAO13L4Uz4hP h+k8DyrayPHva6xNJX5GnfGa5P9A0/xFsOB8cNBBvbBSOEso+4+y2Dd/ZWCoICUT0y3i q52S7Hzq/F8IzpIDIihLFpskIiKLJE47pJ8o7A7ljG+8pDVfSku0djxZT35wPhTWYqen u5Ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-transfer-encoding; bh=niyoVVrkCnZtHySN9SNa70Bo/OYxr8rAsawwwnDT+SQ=; b=rWlYlMisp239MtUACTLVzifSeYt7Rxje5fBFMQjmegjFsP8+LuRsd0zN3z6y3MRMWI DHKSnJqs5Qkq8lqJHZNGljl/7l5OHcGnsAATrmhKsTvl6YCUPbBxRTbOAygWAQQ4Gapq ZWZV1+VjW/LXOcJWTvmSlwtkIae/EN+RulWiO7G0eCv7ZymkDhc2+skmC+oNshpiwLCV je5g7ISMw9mwJRgqAUPR+Pee+3eYxoKNpbKpm2L/Rbt6MiV6E+fBJyxZKbyWrJQiibwz trn5ah2/1SXLfRoU2P/rSwz43bZMcbnrwn687Xi3ImWyggZOfjgAIwW5dInPKL+m8p8W 8tAw== X-Gm-Message-State: AJaThX5A0HIkp9ypgDRDxpkaGBpcNEJubpLprGJgzA8brBHQIwcm/HDn O85yAp4XuPLTg3SWRNVU5P5Ghg== X-Google-Smtp-Source: AGs4zMbQh21RJs9ABrnajrTT5JtaJybwP21mFERNCBHfpMPLUvwA/ua/sSgFhk8aMEJ7YA7AiByLQw== X-Received: by 10.36.36.211 with SMTP id f202mr12338763ita.117.1511448514452; Thu, 23 Nov 2017 06:48:34 -0800 (PST) Received: from [10.0.10.7] (cpe-65-25-48-36.neo.res.rr.com. [65.25.48.36]) by smtp.googlemail.com with ESMTPSA id e142sm3344321ite.28.2017.11.23.06.48.33 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 23 Nov 2017 06:48:33 -0800 (PST) Message-ID: <5A16DFC1.6050406@gmail.com> Date: Thu, 23 Nov 2017 09:48:33 -0500 From: Ernie Luzar User-Agent: Thunderbird 2.0.0.24 (Windows/20100228) MIME-Version: 1.0 To: zep CC: freebsd-questions@freebsd.org Subject: Re: Network interface status: command References: <5A16D9A8.3080303@gmail.com> <4244add0-e809-7de6-2438-62447e49ba4f@gmail.com> In-Reply-To: <4244add0-e809-7de6-2438-62447e49ba4f@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Nov 2017 14:48:35 -0000 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@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@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 XXX 22874340 0 0 574773 0 > 0 0 > em0 - 192.168.XX.0/ nexus 1172609 - - > 540898 - - - > lo0 16384 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.