La commande 'chcore' permet de modifier les paramétrages par défaut utilisés lors de la génération de fichier 'core'.

La syntaxe est simple et donnée ci-dessous dans la documentation officielle V7.1( au moment de l'écriture de l'article.)

 

 

 

 


chcore Command

Purpose

Changes the corefile settings.

Syntax

chcore [ -R registry ] [ -c {on|off|default} ] [ -p {on|off|default} ] [ -l {path| default] [ -n {on|off|default} ] [ username | -d ]

Description

The chcore command is the user interface to change the core settings. It has the following usage:

chcore [-R registry] options [username|-d]
where,

options is at least one (and possibly more) of the following:

-c {on|off|default}
setting for core compression

-p {on|off|default}
setting for core location

-l path
specify directory to use

-n {on|off|default}
setting for core naming

If -d is specified, chcore will change the default setting for the system. The -d option is mutually exclusive with a specified username and with any specification of a registry. If neither -d nor a username is supplied, chcore
will change the setting for the current user. Both the -d option and the ability to change settings for another user (other than the current user) are privileged operations, and may only be run by root or another user with
system authority. Any changes made will not take effect until the next login session.

To change attributes an alternate Identification and Authentication (I&A) mechanism, the -R flag can be used to specify the I&A load module. If the -R flag is not specified, the chcore command uses the default attributes. Load
modules are defined in the /usr/lib/security/methods.cfg file.

Note: The core settings changed by the chcore command are persistent across reboots of the system.

Flags
Item
Description
-c {on|off|default}
Setting for core compression.
-d
Changes the default setting for the system.
-l path
Directory path for stored corefiles.
-n {on|off|default}
Setting for core naming.
-p {on|off|default}
Setting for core location.
-R registry
Specifies the loadable I&A module.

Security

The command can only be run by root or another user with system authority.

Attention RBAC users and Trusted AIX users: This command can perform privileged operations. Only privileged users can run privileged operations. For more information about authorizations and privileges, see Privileged Command
Database in Security. For a list of privileges and the authorizations associated with this command, see the lssecattr command or the getcmdattr subcommand.

Examples
1 To make any process run by root dump compressed core files and restore the location of the core files to the system default, type:

chcore -c on -p default root

Note: If no default is specified, cores will dump in the current directory.
2 To enable a default core path for the system, type:

chcore -p on -l /corefiles -d

Note: All users who do not explicitly disable the core path with chcore -p off or override the core path with chcore -l will dump core files into the directory /corefiles. If a user does not have write permission to that
directory, or the directory does not exist, no corefile will be generated.

Files
Item
Description
/usr/lib/security/methods.cfg
Contains load module definitions.
/etc/security/user
Contains extended user attributes.

icon phone
Téléphone/Whatsapp : +33 (0)6 83 84 85 74
icon phone