函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\debug\kdb\kdb_main.c Create Date:2022-07-27 12:46:37
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:kdb_summary - This function implements the 'summary' command.

函数原型:static int kdb_summary(int argc, const char **argv)

返回类型:int

参数:

类型参数名称
intargc
const char **argv
2516  如果argc则返回: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  如果 Seconds since boot 大于24乘60乘60则
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  返回:0