tfactl status
.------------------------------------------------------------------------------------------------------.
| Host | Status of TFA | PID | Port | Version | Build ID | Inventory Status |
+---------------+---------------+--------+------+------------+----------------------+------------------+
| ab-c-edb-db02 | RUNNING | 192638 | 5000 | 21.4.0.0.0 | 21400020211220074549 | COMPLETE |
| ab-c-edb-db01 | RUNNING | 34670 | 5000 | 21.4.0.0.0 | 21400020211220074549 | COMPLETE |
'---------------+---------------+--------+------+------------+----------------------+------------------'
2.检查tfactl工具的状态
# tfactl toolstatus
Running command tfactltoolstatus on ab-c-edb-db01 ...
.------------------------------------------------------------------.
| TOOLS STATUS - HOST : ab-c-edb-db01 |
+----------------------+--------------+--------------+-------------+
| Tool Type | Tool | Version | Status |
+----------------------+--------------+--------------+-------------+
| AHF Utilities | alertsummary | 21.4.0 | DEPLOYED |
| | calog | 21.4.0 | DEPLOYED |
| | dbglevel | 21.4.0 | DEPLOYED |
| | grep | 21.4.0 | DEPLOYED |
| | history | 21.4.0 | DEPLOYED |
| | ls | 21.4.0 | DEPLOYED |
| | managelogs | 21.4.0 | DEPLOYED |
| | menu | 21.4.0 | DEPLOYED |
| | orachk | 21.4.0 | DEPLOYED |
| | param | 21.4.0 | DEPLOYED |
| | ps | 21.4.0 | DEPLOYED |
| | pstack | 21.4.0 | DEPLOYED |
| | summary | 21.4.0 | DEPLOYED |
| | tail | 21.4.0 | DEPLOYED |
| | triage | 21.4.0 | DEPLOYED |
| | vi | 21.4.0 | DEPLOYED |
+----------------------+--------------+--------------+-------------+
| Development Tools | oratop | 14.1.2 | DEPLOYED |
+----------------------+--------------+--------------+-------------+
| Support Tools Bundle | darda | 2.10.0.R6036 | DEPLOYED |
| | oswbb | 8.3.2 | RUNNING |
| | prw | 12.1.13.11.4 | NOT RUNNING |
'----------------------+--------------+--------------+-------------'
Note :-
DEPLOYED : Installed and Available - To be configured or run interactively.
NOT RUNNING : Configured and Available - Currently turned off interactively.
RUNNING : Configured and Available.
.------------------------------------------------------------------.
| TOOLS STATUS - HOST : ab-c-edb-db02 |
+----------------------+--------------+--------------+-------------+
| Tool Type | Tool | Version | Status |
+----------------------+--------------+--------------+-------------+
| AHF Utilities | alertsummary | 21.4.0 | DEPLOYED |
| | calog | 21.4.0 | DEPLOYED |
| | dbglevel | 21.4.0 | DEPLOYED |
| | grep | 21.4.0 | DEPLOYED |
| | history | 21.4.0 | DEPLOYED |
| | ls | 21.4.0 | DEPLOYED |
| | managelogs | 21.4.0 | DEPLOYED |
| | menu | 21.4.0 | DEPLOYED |
| | orachk | 21.4.0 | DEPLOYED |
| | param | 21.4.0 | DEPLOYED |
| | ps | 21.4.0 | DEPLOYED |
| | pstack | 21.4.0 | DEPLOYED |
| | summary | 21.4.0 | DEPLOYED |
| | tail | 21.4.0 | DEPLOYED |
| | triage | 21.4.0 | DEPLOYED |
| | vi | 21.4.0 | DEPLOYED |
+----------------------+--------------+--------------+-------------+
| Development Tools | oratop | 14.1.2 | DEPLOYED |
+----------------------+--------------+--------------+-------------+
| Support Tools Bundle | darda | 2.10.0.R6036 | DEPLOYED |
| | oswbb | 8.3.2 | RUNNING |
| | prw | 12.1.13.11.4 | NOT RUNNING |
'----------------------+--------------+--------------+-------------'
Note :-
DEPLOYED : Installed and Available - To be configured or run interactively.
NOT RUNNING : Configured and Available - Currently turned off interactively.
RUNNING : Configured and Available.
3.检查配置信息
tfactl pring config
# tfactl print config
.-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------.
| ab-c-edb-db02 |
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------+
| Configuration Parameter | Value |
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------+
| TFA Version ( tfaversion ) | 21.4.0.0.0 |
| Java Version ( javaVersion ) | 1.8 |
| Public IP Network ( publicIp ) | true |
| Repository current size (MB) ( currentsizemegabytes ) | 21 |
| Repository maximum size (MB) ( maxsizemegabytes ) | 10240 |
| Cluster Event Monitor ( clustereventmonitor ) | ON |
| delayusinginstanceprincipal | OFF |
| queryAPI | ON |
| scandiskmon | OFF |
| scanacfslog | OFF |
| File Data Collection ( inventory ) | ON |
| Automatic Purging ( autoPurge ) | ON |
| Internal Search String ( internalSearchString ) | ON |
| ISA Data Gathering ( collection.isa ) | ON |
| Trim Files ( trimfiles ) | ON |
| collectTrm | OFF |
| chmdataapi | ON |
| chanotification ( chanotification ) | ON |
| Skip event if it was flood controlled ( floodcontrol_events ) | OFF |
| collectonsystemstate | ON |
| Consolidate similar events (COUNT shows number of events occurences) ( consolidate_events ) | OFF |
| chmretention | OFF |
| Managelogs Auto Purge ( manageLogsAutoPurge ) | OFF |
| scanacfseventlog | OFF |
| Alert Log Scan ( rtscan ) | ON |
| debugips | OFF |
| generateZipMetadataJson | ON |
| collectAllDirsByFile | ON |
| scanvarlog | OFF |
| Auto Sync Certificates ( autosynccertificates ) | ON |
| Auto Diagcollection ( autodiagcollect ) | OFF |
| Public IP Network ( publicIp ) | ON |
| Flood Control ( floodcontrol ) | ON |
| Generation of Mini Collections ( minicollection ) | ON |
| odscan | ON |
| Disk Usage Monitor ( diskUsageMon ) | OFF |
| Start consuming data provided by SQLTicker ( sqlticker ) | OFF |
| Discovery ( discovery ) | ON |
| analyze | OFF |
| indexInventory | ON |
| Generation of Telemetry Data ( telemetry ) | OFF |
| chaautocollect | OFF |
| Granular Tracing ( granulartracing ) | OFF |
| minPossibleSpaceForPurge | 1024 |
| disk.threshold | 90 |
| Minimum space in MB required to run TFA. TFA will be stopped until at least this amount of space is available in the DATA Directory (Takes effect at next startup) ( minSpaceToRunTFA ) | 20 |
| mem.swapfree | 5120 |
| mem.util.samples | 4 |
| inventoryThreadPoolSize | 1 |
| mem.swaptotal.samples | 2 |
| maxFileAgeToPurge | 1440 |
| mem.free | 20480 |
| actionrestartlimit | 30 |
| Minimum Free Space to enable Alert Log Scan (MB) ( minSpaceForRTScan ) | 500 |
| cpu.io.samples | 30 |
| mem.util | 80 |
| Maximum single Zip File Size (MB) ( maxZipSize ) | 2048 |
| Time interval between consecutive Disk Usage Snapshot(minutes) ( diskUsageMonInterval ) | 60 |
| TFA ISA Purge Thread Delay (minutes) ( tfaDbUtlPurgeThreadDelay ) | 60 |
| firstDiscovery | 0 |
| TFA IPS Pool Size ( tfaIpsPoolSize ) | 5 |
| Maximum File Collection Size (MB) ( maxFileCollectionSize ) | 1024 |
| Time interval between consecutive Managelogs Auto Purge(minutes) ( manageLogsAutoPurgeInterval ) | 60 |
| arc.backupmissing.samples | 2 |
| cpu.util.samples | 2 |
| cpu.usr.samples | 2 |
| cpu.sys | 50 |
| Flood Control Limit Count ( fc.limit ) | 3 |
| Flood Control Pause Time (minutes) ( fc.pauseTime ) | 120 |
| Maximum Number of TFA Logs ( maxLogCount ) | 10 |
| DB Backup Delay Hours ( dbbackupdelayhours ) | 27 |
| cdb.backup.samples | 1 |
| arc.backupstatus | 1 |
| Automatic Purging Frequency ( purgeFrequency ) | 4 |
| TFA ISA Purge Age (seconds) ( tfaDbUtlPurgeAge ) | 604800 |
| Maximum Collection Size of Core Files (MB) ( maxCoreCollectionSize ) | 500 |
| Maximum Compliance Index Size (MB) ( maxcompliancesize ) | 150 |
| cpu.util | 80 |
| mem.swapfree.samples | 2 |
| cdb.backupstatus | 1 |
| mem.swaputl.samples | 2 |
| arc.backup.samples | 3 |
| unreachablenodeTimeOut | 3600 |
| Flood Control Limit Time (minutes) ( fc.limitTime ) | 60 |
| mem.swaputl | 10 |
| mem.free.samples | 2 |
| Maximum Size of Core File (MB) ( maxCoreFileSize ) | 50 |
| disk.samples | 1 |
| cpu.sys.samples | 30 |
| cpu.usr | 98 |
| arc.backupmissing | 1 |
| cpu.io | 20 |
| Archive Backup Delay Minutes ( archbackupdelaymins ) | 40 |
| Allowed Sqlticker Delay in Minutes ( sqltickerdelay ) | 3 |
| inventoryPurgeThreadInterval | 720 |
| Age of Purging Collections (Hours) ( minFileAgeToPurge ) | 12 |
| cpu.idle.samples | 2 |
| unreachablenodeSleepTime | 300 |
| cpu.idle | 20 |
| mem.swaptotal | 24 |
| TFA ISA CRS Profile Delay (minutes) ( tfaDbUtlCrsProfileDelay ) | 2 |
| Maximum Compliance Runs to be Indexed ( maxcomplianceruns ) | 30 |
| cdb.backupmissing | 1 |
| cdb.backupmissing.samples | 2 |
| Trim Size ( trimsize ) | 500000 |
| Maximum Size of TFA Log (MB) ( maxLogSize ) | 52428800 |
| minTimeForAutoDiagCollection | 300 |
| skipScanThreshold | 100 |
| fileCountInventorySwitch | 5000 |
| TFA ISA Purge Mode ( tfaDbUtlPurgeMode ) | profile |
| country | US |
| Debug Mask (Hex) ( debugmask ) | 0x000000 |
| Object Store Secure Upload ( oss.secure.upload ) | true |
| Setting for ACR redaction (none|SANITIZE|MASK) ( redact ) | none |
| language | en |
| AlertLogLevel | ALL |
| BaseLogPath | ERROR |
| encoding | UTF-8 |
| UserLogLevel | ALL |
| Logs older than the time period will be auto purged(days[d]|hours[h]) ( manageLogsAutoPurgePolicyAge ) | 30d |
| isaMode | enabled |
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------'
4.列出有权限访问tfactl的用户
tfactl access lsusers
5.添加或删除用户
tfactl access add -user rpdtro
tfactl access remove -user rdptro
6.修改用户属性
tfactl access promote -user oracle
7.修改tfactl的端口,需要重启
tfactl set port=5001
8.启停tfactl
tfactl start/ tfactl stop
/etc/init.d/init.tfa {stop|start|shutdown|restart}
9.开启自动启动
tfactl disable
tfactl enable
10.版本查看
tfactl version
11.收集诊断报告
tfactl diagcollect -all
12.查看通知地址
tfactl get notificationAddress
13.修改通知地址
tfactl set notificationAddress=oracle:admin@xxxx.com
14.查看摘要信息
tfactl summary
tfactl summary -html
tfactl summary -patch -html
tfactl summary -asm -html
15.查看smtp
tfactl print smtp
16.tfactl managelogs
tfactl managelogs -show usage
17.purge旧的数据
-- This is just a dry run:
tfactl managelogs -purge -older 5d -dryrun
-- This will actually delete the logs older than 5 days
tfactl managelogs -purge -older 5d
-- Delete only GI logs:
tfactl managelogs -purge -gi 5d
tfactl run managelogs -purge -older 5d -gi
-- Delete only database logs:
tfactl run managelogs -purge -older -5d -database
18.查看repository
tfactl print repository
19.组件信息
tfactl print components
20.诊断集合详细信息
tfactl print collections
21.同步
tfactl syncnodes
22.检查AHF的安装位置
cat /etc/oracle.ahf.loc
23.检查进程
ps -ef | grep -i tfa | grep -v grep
24.检查AHF的状态
ahfctl statusahf
.------------------------------------------------------------------------------------------------.
| Host | Status of TFA | PID | Port | Version | Build ID | Inventory Status |
+---------+---------------+--------+------+------------+----------------------+------------------+
| testdb1 | RUNNING | 396351 | 5000 | 21.4.0.0.0 | 21400020211220074549 | COMPLETE |
'---------+---------------+--------+------+------------+----------------------+------------------'
------------------------------------------------------------
Master node = testdb1
orachk daemon version = 21.4.0_20211220
Install location = /opt/oracle.ahf/orachk
Started at = Tue Jan 04 14:08:11 CST 2022
Scheduler type = orachk Scheduler
Scheduler PID: 150747
------------------------------------------------------------
ID: orachk.autostart_client_oratier1
------------------------------------------------------------
AUTORUN_FLAGS = -usediscovery -profile oratier1 -dball -showpass -tag autostart_client_oratier1 -readenvconfig
COLLECTION_RETENTION = 7
AUTORUN_SCHEDULE = 3 2 * * 1,2,3,4,5,6
------------------------------------------------------------
------------------------------------------------------------
ID: orachk.autostart_client
------------------------------------------------------------
AUTORUN_FLAGS = -usediscovery -tag autostart_client -readenvconfig
COLLECTION_RETENTION = 14
AUTORUN_SCHEDULE = 3 3 * * 0
------------------------------------------------------------
Next auto run starts on Jan 05, 2022 02:03:00
ID:orachk.AUTOSTART_CLIENT_ORATIER1
25.开启/移除ORAchk自动启动
orachk -autostart
orachk -autostop
# ahfctl getupgrade -all
autoupgrade : [not set]
autoupgrade.swstage : [not set]
autoupgrade.frequency : [not set]
autoupgrade.servicename : [not set]