Sort sfbuf allocation counters with other sfbuf information.
MFC after: 3 days
This commit is contained in:
parent
4a99d6f90a
commit
dd8dfa82e7
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=155556
@ -162,19 +162,6 @@ mbpr(void *kvmd, u_long mbaddr)
|
||||
printf("%llu mbuf tags in use\n", tag_count);
|
||||
#endif
|
||||
|
||||
if (live) {
|
||||
mlen = sizeof(nsfbufs);
|
||||
if (!sysctlbyname("kern.ipc.nsfbufs", &nsfbufs, &mlen, NULL,
|
||||
0) &&
|
||||
!sysctlbyname("kern.ipc.nsfbufsused", &nsfbufsused,
|
||||
&mlen, NULL, 0) &&
|
||||
!sysctlbyname("kern.ipc.nsfbufspeak", &nsfbufspeak,
|
||||
&mlen, NULL, 0)) {
|
||||
printf("%d/%d/%d sfbufs in use (current/peak/max)\n",
|
||||
nsfbufsused, nsfbufspeak, nsfbufs);
|
||||
}
|
||||
}
|
||||
|
||||
/*-
|
||||
* Calculate in-use bytes as:
|
||||
* - straight mbuf memory
|
||||
@ -223,6 +210,15 @@ mbpr(void *kvmd, u_long mbaddr)
|
||||
packet_failures);
|
||||
|
||||
if (live) {
|
||||
mlen = sizeof(nsfbufs);
|
||||
if (!sysctlbyname("kern.ipc.nsfbufs", &nsfbufs, &mlen, NULL,
|
||||
0) &&
|
||||
!sysctlbyname("kern.ipc.nsfbufsused", &nsfbufsused,
|
||||
&mlen, NULL, 0) &&
|
||||
!sysctlbyname("kern.ipc.nsfbufspeak", &nsfbufspeak,
|
||||
&mlen, NULL, 0))
|
||||
printf("%d/%d/%d sfbufs in use (current/peak/max)\n",
|
||||
nsfbufsused, nsfbufspeak, nsfbufs);
|
||||
mlen = sizeof(mbstat);
|
||||
if (sysctlbyname("kern.ipc.mbstat", &mbstat, &mlen, NULL, 0)) {
|
||||
warn("kern.ipc.mbstat");
|
||||
|
Loading…
Reference in New Issue
Block a user