If you like BoxMatrix then please contribute Supportdata, Supportdata2, Firmware and/or Hardware (get in touch).
My metamonk@yahoo.com is not reachable by me since years. Please use hippie2000@webnmail.de instead.

0
U

Property:avm logger.ko

From BoxMatrix


BoxMatrix >> Shell-Commands >> avm_logger.ko @ BoxMatrix   -   IRC-Chat   -   Translate: de es fr it nl pl
News Selectors Models Accessories Components Environment Config Commands System Webif Software Develop Lexicon Community Project Media

Startup-Scr Hotplug-Scr BusyBox-Cmds Bash-Cmds AVM-Cmds Chipset-Cmds Linux-Cmds Shared-Libs Kernel-Mods Research

Kernel-Module

Note that Kernel 2.4 and builtin *.o modules have been renamed to *.ko for an easier comparison.

Goto:   Examples  -  GPL-Browser  -  Source  -  Dependencies   -   Model-Matrix   -   Symbols   -   SMW-Browser

Details

avm_logger.ko is a kernel driver implementing ringbuffer logging.

It provides a procfs interfaces at /proc/avm/log, see the Examples.

In recent firmware only capi_codec.ko creates a custom logger there. in /proc/avm/log/capicodec.

This is a virtual module to have an article about it. It is part of the avm.ko bundle at:

drivers/char/avm_new/avm_logger.c

Examples

fw 7.39 example:

root@fritz2:/var/mod/root# ls -l /proc/avm/log
 
-r--r-----    1 root     root             0 Jan  2 05:17 capicodec

GPL-Browser

Daily updated index of all avm_logger.ko code findings on the GPL-Browser. Last update: 2024-04-20 04:13 GMT.
The Files header attempts to list the files which belong to this module. Useful if a directory contains multiple modules.
The Browse column points to the Path of the Makefile referring this code on the gpl.boxmatrix.info service.
The SoC column lists the Chip-Codenames, the Model column lists the nicks of the Box-Models.
The Diff column links the comparison of the AVM Kernel to the pristine original from Kernel.org.
The Download column links the full tarball the respective directory content is extracted from.
The presence of the source does not mean it fits the respective model and architecture. See the Model-Matrix where it's used.
Note that this list matches module names with hyphen (-) and underscore (_) exchangeable, same as modprobe does.

Source

Overview of functions and some comments:

// From drivers/char/avm_new/include/avm/sammel/debug.h

/**
 * avm_logger.c
 */
enum _avm_logger_flag {
	logger_no_printk_trace = 0x1 << 0,
	logger_log_cr_dir = 0x1
			    << 1, /*--- log-link also in /proc/avm/log_cr ---*/
	logger_log_sd_dir = 0x1
			    << 2, /*--- log-link also in /proc/avm/log_sd ---*/
};

#if defined(CONFIG_PROC_FS)
/**
 * @brief:       create logger
 * the log is locate in /proc/avm/log/<loggername>
 * @param ringbuf_size  size of ringbuffer (minsize is PAGE_SIZE)
 * @logger_name			name of logger
 * @flag				or-able features (see above)
 *
 * @return handle - PTR or ERR_PTR
 */
void *avm_logger_create(size_t ringbuf_size, const char *logger_name,
			enum _avm_logger_flag flag);

/**
 * close logger
 */
void avm_logger_close(void *handle);

/**
 * @brief logger - output also to printk
 * @param handle logger-handle from avm_logger_create()
 * @param fmt and variable list like printk
 */
asmlinkage __printf(2, 3) int avm_logger_printk(void *handle, const char *fmt,
						...);
int avm_logger_ratelimit(void *handle, struct ratelimit_state *rs,
			 const char *func);

#define avm_logger_printk_ratelimited(handle, fmt, ...)                        \
	({                                                                     \
		static DEFINE_RATELIMIT_STATE(_avmlogger_rs,                   \
					      DEFAULT_RATELIMIT_INTERVAL,      \
					      DEFAULT_RATELIMIT_BURST);        \
									       \
		if (avm_logger_ratelimit(handle, &_avmlogger_rs, __func__))    \
			avm_logger_printk(handle, fmt, ##__VA_ARGS__);         \
	})
#else /*--- #if defined(CONFIG_PROC_FS) ---*/
static inline void *avm_logger_create(size_t ringbuf_size,
				      const char *logger_name,
				      enum _avm_logger_flag flag)
{
	return NULL;
}

static inline void avm_logger_close(void *handle)
{
}
#define avm_logger_printk(handle, fmt, ...) pr_info(fmt)
#define avm_logger_printk_ratelimited(handle, fmt, ...) printk_ratelimited(fmt)

#endif /*--- #else ---*/ /*--- #if defined(CONFIG_PROC_FS) ---*/

/*
 * Allows to intject information into the avm_oom_show_memstat stream.
 *
 * This is called in an atomic context and possible during panic, so ensure
 * robust handling.
 *
 * The provided data is a seq_file to output the data. Use sseq_* functions
 * to ensure flushing the output.
 */
int avm_oom_info_chain_register(struct notifier_block *nb);
int avm_oom_info_chain_unregister(struct notifier_block *nb);

Dependencies

Daily updated index of all dependencies of this module. Last update: 2024-04-20 07:33 GMT.
A * in the Mod column marks info from Supportdata-Probes, which will always stay incomplete.

Relation Typ Object Mod Firmware Info Origin
Enabled by kcfg CONFIG_AVM_DEBUG 64 4.76 - 7.90 Support for AVM Debug (avm.ko, avm_debug.ko, avm_logger.ko) Linux
1 dependency for this module

Model-Matrix

Daily updated index of the presence, path and size of this module for each model. Last update: 2024-04-20 05:17 GMT.
Showing all models using this module. Click any column header (click-wait-click) to sort the list by the respective data.
The (main/scrpn/boot/arm/prx/atom) label in the Model column shows which CPU is meant for models with multiple Linux instances.
Note that this list is merged from Firmware-Probes of all known AVM firmware for a model, including Recovery.exe and Labor-Files.

Model Firmware Path Size
0 models use this module

Symbols

Daily updated index of all symbols of this module. Last update: 2024-04-20 07:33 GMT.

Firmware Symbol
0 symbols for this module

SMW-Browser

Information is currently being retrieved from the backend.
 

Synonyms

Showing 1 related property.

a