Documentation
¶
Index ¶
Constants ¶
View Source
const ( CopyServerConfigEnum int32 = iota CollectSystemCmdEnum CollectServerLogEnum CollectExtraLogsDirEnum CollectDaosServerCmdEnum CollectDmgCmdEnum CollectDmgDiskInfoEnum CollectAgentCmdEnum CollectClientLogEnum CollectAgentLogEnum CopyAgentConfigEnum RsyncLogEnum ArchiveLogsEnum )
View Source
const ( YYYYMMDD = "2006-01-02" // Date format as it is expected from commandline argument HHMMSS = "15:04:05" // Time format as it is expected from commandline argument YYYYMMDD_HHMMSS = "2006-01-02 15:04:05" // Date/Time format as it is defined by ISO 8601 YYYYMMDD_HHMMSS_LOG = "2006/01/02 15:04:05" // Date/Time format as it is used in DAOS logs )
View Source
const (
DaosServerConfig = "DaosServerConfig" // Copy the server config
)
Folder names to copy logs and configs
View Source
const DmgDeviceHealthCmd = "dmg storage query list-devices --health"
View Source
const DmgListDeviceCmd = "dmg storage query list-devices"
Variables ¶
View Source
var AgentCmd = []string{
"daos_agent version",
"daos_agent net-scan",
"daos_agent dump-topology",
}
View Source
var DaosServerCmd = []string{
"daos_server version",
"daos_metrics",
"dump-topology",
}
View Source
var DmgCmd = []string{
"dmg system get-prop",
"dmg system query",
"dmg system list-pools",
"dmg system leader-query",
"dmg system get-attr",
"dmg network scan",
"dmg storage scan",
"dmg storage scan -n",
"dmg storage scan -m",
"dmg storage query list-pools -v",
"dmg storage query usage",
}
View Source
var ServerLog = []string{
"EngineLog",
"ControlLog",
"HelperLog",
}
View Source
var SystemCmd = []string{
"dmesg",
"df -h",
"mount",
"ps axf",
"top -bcn1 -w512",
"lspci -D",
"sysctl -a",
"printenv",
"rpm -qa --qf '(%{INSTALLTIME:date}): %{NAME}-%{VERSION}\n'",
}
Functions ¶
func ArchiveLogs ¶
func ArchiveLogs(log logging.Logger, opts ...CollectLogsParams) error
Create the Archive of log folder.
func CollectSupportLog ¶
func CollectSupportLog(log logging.Logger, opts ...CollectLogsParams) error
Common Entry/Exit point function.
Types ¶
type CollectLogSubCmd ¶
type CollectLogSubCmd struct {
StopOnError bool `short:"s" long:"stop-on-error" description:"Stop the collect-log command on very first error"`
TargetFolder string `short:"t" long:"target-folder" description:"Target Folder location where log will be copied"`
Archive bool `short:"z" long:"archive" description:"Archive the log/config files"`
ExtraLogsDir string `short:"c" long:"extra-logs-dir" description:"Collect the Logs from given directory"`
LogStartDate string `short:"D" long:"start-date" description:"Specify the start date, the day from log will be collected, Format: YYYY-MM-DD"`
LogEndDate string `short:"F" long:"end-date" description:"Specify the end date, the day till the log will be collected, Format: YYYY-MM-DD"`
LogStartTime string `short:"S" long:"log-start-time" description:"Specify the log collection start time, Format: HH:MM:SS"`
LogEndTime string `short:"E" long:"log-end-time" description:"Specify the log collection end time, Format: HH:MM:SS"`
FileTransferExecArgs string `short:"T" long:"transfer-args" description:"Extra arguments for alternate file transfer tool"`
}
func (*CollectLogSubCmd) DateTimeValidate ¶
func (cmd *CollectLogSubCmd) DateTimeValidate() error
Verify if the date and time argument is valid and return error if it's invalid
type CollectLogsParams ¶
type LogTypeSubCmd ¶
type LogTypeSubCmd struct {
LogType string `short:"e" long:"log-type" description:"collect specific logs only admin,control,server and ignore everything else"`
}
func (*LogTypeSubCmd) LogTypeValidate ¶
func (cmd *LogTypeSubCmd) LogTypeValidate() ([]string, error)
Verify LogType argument is valid.Return error, if it's not matching as describer in help
type ProgressBar ¶
type ProgressBar struct {
Start int // start int number
Total int // end int number
Steps int // number to be increased per step
NoDisplay bool // Option to skip progress bar if Json output is enabled
}
func (*ProgressBar) Display ¶
func (p *ProgressBar) Display() string
Print the progress while collect-log command is in progress
Click to show internal directories.
Click to hide internal directories.