Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\debug\kdb\kdb_main.c Create Date:2022-07-28 11:42:20
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:kdb_summary - This function implements the 'summary' command.

Proto:static int kdb_summary(int argc, const char **argv)

Type:int

Parameter:

TypeParameterName
intargc
const char **argv
2516  If argc Then Return KDB_ARGCOUNT
2519  kdb_printf("sysname %s\n", sysname)
2520  kdb_printf("release %s\n", release)
2521  kdb_printf("version %s\n", version)
2522  kdb_printf("machine %s\n", machine)
2523  kdb_printf("nodename %s\n", nodename)
2524  kdb_printf("domainname %s\n", domainname)
2526  now = __ktime_get_real_seconds - The same as ktime_get_real_seconds* but without the sequence counter protect. This internal function* is called just when timekeeping lock is already held.
2527  me64_to_tm - converts the calendar time to local broken-down time*@totalsecs the number of seconds elapsed since 00:00:00 on January 1, 1970,* Coordinated Universal Time (UTC)
2528  kdb_printf("date %04ld-%02d-%02d %02d:%02d:%02d tz_minuteswest %d\n", 1900 + he number of years since 1900 , he number of months since January, in the range 0 to 11 + 1, he day of the month, in the range 1 to 31 , he number of hours past midnight, in the range 0 to 23 , he number of minutes after the hour, in the range 0 to 59, he number of seconds after the minute, normally in the range* 0 to 59, but can be up to 60 to allow for leap seconds, minutes west of Greenwich )
2534  Most of this code has been lifted from kernel/timer.c::sys_sysinfo().* I cannot call that code directly from kdb, it has an unconditional* cli()/sti() and calls routines that take locks which can stop the debugger.
2535  kdb_printf("uptime ")
2536  If Seconds since boot > 24 * 60 * 60 Then
2537  days = Seconds since boot / 24 * 60 * 60
2538  Seconds since boot %= 24 * 60 * 60
2539  kdb_printf("%d day%s ", days, days == 1 ? "" : "s")
2541  kdb_printf("%02ld:%02ld\n", Seconds since boot / (60 * 60), ( Seconds since boot / 60) % 60)
2543  kdb_printf("load avg %ld.%02ld %ld.%02ld %ld.%02ld\n", LOAD_INT( 1, 5, and 15 minute load averages [0]), LOAD_FRAC( 1, 5, and 15 minute load averages [0]), LOAD_INT( 1, 5, and 15 minute load averages [1]), LOAD_FRAC( 1, 5, and 15 minute load averages [1]), LOAD_INT( 1, 5, and 15 minute load averages [2]), LOAD_FRAC( 1, 5, and 15 minute load averages [2]))
2550  kdb_printf("\nMemTotal: %8lu kB\nMemFree: %8lu kB\nBuffers: %8lu kB\n", Display in kilobytes ( Total usable main memory size ), Display in kilobytes ( Available memory size ), Display in kilobytes ( Memory used by buffers ))
2553  Return 0