2022年12月22日木曜日

パーティション作成

【MariaDB パーティション作成】
ALTER TABLE sales.sst004 PARTITION BY RANGE COLUMNS( createdatetime ) ( 
  PARTITION p202301 VALUES LESS THAN ('20230201000000000'),
  PARTITION p202302 VALUES LESS THAN ('20230301000000000'),
  PARTITION p202303 VALUES LESS THAN ('20230401000000000'),
  PARTITION p202304 VALUES LESS THAN ('20230501000000000'),
  PARTITION p202305 VALUES LESS THAN ('20230601000000000'),
  PARTITION p202306 VALUES LESS THAN ('20230701000000000'),
  PARTITION p202307 VALUES LESS THAN ('20230801000000000'),
  PARTITION p202308 VALUES LESS THAN ('20230901000000000'),
  PARTITION p202309 VALUES LESS THAN ('20231001000000000'),
  PARTITION p202310 VALUES LESS THAN ('20231101000000000'),
  PARTITION p202311 VALUES LESS THAN ('20231201000000000'),
  PARTITION p202312 VALUES LESS THAN ('20240101000000000'),
  PARTITION p999999 VALUES LESS THAN MAXVALUE
);

追加
ALTER TABLE sales.sst004 REORGANIZE PARTITION p999999 INTO (
  PARTITION p202402 VALUES LESS THAN ('20240301000000000'),
  PARTITION p999999 VALUES LESS THAN MAXVALUE
);

データ削除
ALTER TABLE sales.sst004 TRUNCATE PARTITION p202301;

削除&データ削除
ALTER TABLE sales.sst004 DROP PARTITION p20240101;

解放
ALTER TABLE sales.sst004 REMOVE PARTITIONING;


ALTER TABLE sales.sst004 PARTITION BY RANGE COLUMNS( createdatetime )
  SUBPARTITION BY HASH(GCODE,CCODE,SODE)
  SUBPARTITIONS 8 (
  PARTITION p202301 VALUES LESS THAN ('20230201000000000'),
  PARTITION p202302 VALUES LESS THAN ('20230301000000000'),
  PARTITION p202303 VALUES LESS THAN ('20230401000000000'),
  PARTITION p202304 VALUES LESS THAN ('20230501000000000'),
  PARTITION p202305 VALUES LESS THAN ('20230601000000000'),
  PARTITION p202306 VALUES LESS THAN ('20230701000000000'),
  PARTITION p202307 VALUES LESS THAN ('20230801000000000'),
  PARTITION p202308 VALUES LESS THAN ('20230901000000000'),
  PARTITION p202309 VALUES LESS THAN ('20231001000000000'),
  PARTITION p202310 VALUES LESS THAN ('20231101000000000'),
  PARTITION p202311 VALUES LESS THAN ('20231201000000000'),
  PARTITION p202312 VALUES LESS THAN ('20240101000000000'),
  PARTITION p999999 VALUES LESS THAN MAXVALUE
);

ALTER TABLE sales.sst004 SUBPARTITION BY HASH COLUMNS( gcode,ccode,scode ) (
 SUBPARTITIONS 8 )
 
 
 
 create table  sales.sst0041  (
   remarks1        varchar(256),
   remarks2        varchar(256),
   remarks3        varchar(256),
   remarks4        varchar(256),
   remarks5        varchar(256),
  primary key ( gcode ,ccode ,scode, createdatetime  )
) engine=innodb default charset=utf8mb4 comment='会計伝票'
 PARTITION BY RANGE  COLUMNS( createdatetime )
SUBPARTITION BY HASH(GCODE,CCODE,SODE)             → MariaDB ではエラー
SUBPARTITIONS 8
(PARTITION `p202301` VALUES LESS THAN ('20230201000000000') ,
 PARTITION `p202302` VALUES LESS THAN ('20230301000000000') ,
 PARTITION `p202303` VALUES LESS THAN ('20230401000000000') ,
 PARTITION `p202304` VALUES LESS THAN ('20230501000000000') ,
 PARTITION `p202305` VALUES LESS THAN ('20230601000000000') ,
 PARTITION `p202306` VALUES LESS THAN ('20230701000000000') ,
 PARTITION `p202307` VALUES LESS THAN ('20230801000000000') ,
 PARTITION `p202308` VALUES LESS THAN ('20230901000000000') ,
 PARTITION `p202309` VALUES LESS THAN ('20231001000000000') ,
 PARTITION `p202310` VALUES LESS THAN ('20231101000000000') ,
 PARTITION `p202311` VALUES LESS THAN ('20231201000000000') ,
 PARTITION `p202312` VALUES LESS THAN ('20240101000000000') ,
 PARTITION `p999999` VALUES LESS THAN (MAXVALUE));

【ORACLE パーティション作成】
CREATE TABLE ARCSDBCB.CCP020 (
CDATE VARCHAR2 (8) NOT NULL,
GCODE VARCHAR2 (3) NOT NULL,
CCODE VARCHAR2 (4) NOT NULL,
SCODE VARCHAR2 (4) NOT NULL,
RCODE VARCHAR2 (13) NOT NULL,
SALESDATE VARCHAR2 (8) NOT NULL,
SALESTIME VARCHAR2 (6) NOT NULL,
RCOUNTER VARCHAR2 (12) NOT NULL,
CANCELNO VARCHAR2 (12) ,
CARDTYPE VARCHAR2 (1) NOT NULL,
SALESTYPE VARCHAR2 (1) NOT NULL,
CREDITCCODE VARCHAR2 (5) NOT NULL,
CREDITBTYPE VARCHAR2 (1) NOT NULL,
CREDITKEYSID VARCHAR2 (15) NOT NULL,
CREDITSID VARCHAR2 (15) ,
AMOUNT NUMBER (10) NOT NULL,
CARDMETHOD VARCHAR2 (2) NOT NULL,
COMPANYFEE NUMBER (6,2) ,
COMPANYAMOUNT NUMBER (10) ,
MEMBERFEE NUMBER (6,2) ,
MEMBERAMOUNT NUMBER (10) ,
PAIDPLANDATE VARCHAR2 (8) DEFAULT '00000000',
APPROVALNO VARCHAR2 (10) ,
CAFISDATE VARCHAR2 (8) ,
PGCODE VARCHAR2 (3) NOT NULL,
PCCODE VARCHAR2 (4) NOT NULL,
PSCODE VARCHAR2 (4) NOT NULL,
UDATE VARCHAR2 (14) NOT NULL,
CTYPE VARCHAR2 (1) DEFAULT '0'
)
PCTFREE 10
STORAGE(INITIAL 64K)
PARTITION BY RANGE ( PAIDPLANDATE )
SUBPARTITION BY HASH ( GCODE, CCODE, PSCODE )
SUBPARTITIONS 2
(
PARTITION p202212 VALUES LESS THAN ('20230101'),
PARTITION p202301 VALUES LESS THAN ('20230201'),
PARTITION p202302 VALUES LESS THAN ('20230301'),
PARTITION p202303 VALUES LESS THAN ('20230401'),
PARTITION p202304 VALUES LESS THAN ('20230501'),
PARTITION p202305 VALUES LESS THAN ('20230601'),
PARTITION p202306 VALUES LESS THAN ('20230701'),
PARTITION p202307 VALUES LESS THAN ('20230801'),
PARTITION p202308 VALUES LESS THAN ('20230901'),
PARTITION p202309 VALUES LESS THAN ('20231001'),
PARTITION p202310 VALUES LESS THAN ('20231101'),
PARTITION p202311 VALUES LESS THAN ('20231201'),
PARTITION p202312 VALUES LESS THAN ('20240101'),
PARTITION p202401 VALUES LESS THAN ('20240201'),
PARTITION p202402 VALUES LESS THAN ('20240301'),
PARTITION p202403 VALUES LESS THAN ('20240401'),
PARTITION p202404 VALUES LESS THAN ('20240501'),
PARTITION p202405 VALUES LESS THAN ('20240601'),
PARTITION p202406 VALUES LESS THAN ('20240701'),
PARTITION p202407 VALUES LESS THAN ('20240801'),
PARTITION p202408 VALUES LESS THAN ('20240901'),
PARTITION p202409 VALUES LESS THAN ('20241001'),
PARTITION p202410 VALUES LESS THAN ('20241101'),
PARTITION p202411 VALUES LESS THAN ('20241201'),
PARTITION p202412 VALUES LESS THAN ('20250101'),
PARTITION p202501 VALUES LESS THAN ('20250201'),
PARTITION p202502 VALUES LESS THAN ('20250301'),
PARTITION p202503 VALUES LESS THAN ('20250401'),
PARTITION p202504 VALUES LESS THAN ('20250501'),
PARTITION p202505 VALUES LESS THAN ('20250601'),
PARTITION p202506 VALUES LESS THAN ('20250701'),
PARTITION p202507 VALUES LESS THAN ('20250801'),
PARTITION p202508 VALUES LESS THAN ('20250901'),
PARTITION p202509 VALUES LESS THAN ('20251001'),
PARTITION p202510 VALUES LESS THAN ('20251101'),
PARTITION p202511 VALUES LESS THAN ('20251201'),
PARTITION p202512 VALUES LESS THAN ('20260101'),
PARTITION p202601 VALUES LESS THAN ('20260201'),
PARTITION p202602 VALUES LESS THAN ('20260301'),
PARTITION p202603 VALUES LESS THAN ('20260401'),
PARTITION p202604 VALUES LESS THAN ('20260501'),
PARTITION p202605 VALUES LESS THAN ('20260601'),
PARTITION p202606 VALUES LESS THAN ('20260701'),
PARTITION p202607 VALUES LESS THAN ('20260801'),
PARTITION p202608 VALUES LESS THAN ('20260901'),
PARTITION p202609 VALUES LESS THAN ('20261001'),
PARTITION p202610 VALUES LESS THAN ('20261101'),
PARTITION p202611 VALUES LESS THAN ('20261201'),
PARTITION p202612 VALUES LESS THAN ('20270101'),
PARTITION p202701 VALUES LESS THAN ('20270201'),
PARTITION p202702 VALUES LESS THAN ('20270301'),
PARTITION p202703 VALUES LESS THAN ('20270401'),
PARTITION p202704 VALUES LESS THAN ('20270501'),
PARTITION p202705 VALUES LESS THAN ('20270601'),
PARTITION p202706 VALUES LESS THAN ('20270701'),
PARTITION p202707 VALUES LESS THAN ('20270801'),
PARTITION p202708 VALUES LESS THAN ('20270901'),
PARTITION p202709 VALUES LESS THAN ('20271001'),
PARTITION p202710 VALUES LESS THAN ('20271101'),
PARTITION p202711 VALUES LESS THAN ('20271201'),
PARTITION p202712 VALUES LESS THAN ('20280101')
)
tablespace user_data;

ALTER TABLE ARCSDBCB.CCP020 DROP CONSTRAINT CCP020_PRIMARY CASCADE DROP INDEX;

ALTER TABLE ARCSDBCB.CCP020 DROP PRIMARY KEY;
ALTER TABLE ARCSDBCB.CCP020 ADD CONSTRAINT CCP020_PRIMARY PRIMARY KEY (
CDATE,
GCODE,
CCODE,
SCODE,
RCODE,
RCOUNTER,
SALESDATE,
SALESTIME,
CARDTYPE
)
USING INDEX;


DROP INDEX arcsdbcb.ccp020_INDEX01;
DROP INDEX arcsdbcb.ccp020_index02;

CREATE INDEX ARCSDBCB.CCP020_INDEX01 ON ARCSDBCB.CCP020 (
CDATE
);

CREATE INDEX ARCSDBCB.CCP020_INDEX02 ON ARCSDBCB.CCP020 (
PAIDPLANDATE
);

【デフォルトユーザ領域変更】

SQL> CREATE TABLESPACE 表領域名
 DATAFILE 'データファイル名(フルパス指定可).dbf' SIZE 100M
 AUTOEXTEND ON NEXT 500K MAXSIZE 1024M;


SQL> alter session set container=arcsdbms;
SQL> create tablespace user_data datafile '/u01/app/oracle/oradata/ORCL/datafile/user_data.dbf' size 1M autoextend on next 512k maxsize  1G;

SQL> SELECT USERNAME, DEFAULT_TABLESPACE FROM dba_users where username = 'ARCSDBCB';

SQL> ALTER USER ARCSDBCB DEFAULT TABLESPACE USER_DATA;
ORA-00959: 表領域'USER_DATA'は存在しません。 
→コンテナを指定していなかった為。


【統計情報更新】
$ sqlp / as sysdba
SQL>show con_name
SQL> show pdbs
SQL> alter session set container=arcsdbms;
SQL> analyze table テーブル名 compute statistics;
SQL> analyze table テーブル名 estimate statistics sample 10 percent;
SQL> analyze table テーブル名 delete statistics;
SQL> analyze index arcsdbcb.ccp020_index01 validate structure;

又は、
SQL> execute dbms_stats.gather_database_stats_job_proc();

 


2022年12月6日火曜日

CISCO stack 再起動

$ssh col301
COL301> enable
COL301# show switch

Switch# Role Mac Address Priority Version State
------------------------------------------------------------
*1 Active 0042.5a70.3d00 15 V07 Ready
  2 Standby 0038.df83.d080 10 V07 Ready

Stanby機から再起動

COL301# reload slot 2
Proceed with reload?[confirm]

Switch#   Role    Mac Address     Priority Version  State 
------------------------------------------------------------
*1       Active   0042.5a7e.8880     15     V07     Ready               
 2       Standby  00a7.4280.a800     10     V07     Sync not started    


COL301# show switch
Switch# Role Mac Address Priority Version State
------------------------------------------------------------ 
*1 Active 0042.5a70.3d00 15 V07 Ready
 2 Standby 0038.df83.d080 10 V07 Removed


Switch# Role Mac Address Priority Version State
------------------------------------------------------------ 
*1 Active 0042.5a70.3d00 15 V07 Ready
  2 Standby 0038.df83.d080 10 V07 Initializing


Switch# Role Mac Address Priority Version State
------------------------------------------------------------ 
*1 Active 0042.5a70.3d00 15 V07 Ready
  2 Standby 0038.df83.d080 10 V07 Syncing


Switch# Role Mac Address Priority Version State
------------------------------------------------------------ 
*1 Active 0042.5a70.3d00 15 V07 Ready
  2 Standby 0038.df83.d080 10 V07 Ready


Switch# Role Mac Address Priority Version State
------------------------------------------------------------
*1 Active 0042.5a70.3d00 15 V07 Ready
  2 Standby 0038.df83.d080 10 V07 HA sync in progress

Switch# Role Mac Address Priority Version State
------------------------------------------------------------ 
*1 Active 0042.5a70.3d00 15 V07 Ready
  2 Standby 0038.df83.d080 10 V07 Ready

COL301# show logging
Nov 25 22:02:00.258: %HA_CONFIG_SYNC-6-BULK_CFGSYNC_SUCCEED: Bulk Sync succeeded
Nov 25 22:01:59.517: %SPANTREE-6-PORTDEL_ALL_VLANS: GigabitEthernet1/0/23 deleted from all Vlans (COL301-2)
Nov 25 22:01:59.518: %SPANTREE-6-PORTDEL_ALL_VLANS: GigabitEthernet2/0/23 deleted from all Vlans (COL301-2) 
Nov 25 22:02:01.244: %RF-5-RF_TERMINAL_STATE: 1 ha_mgr: Terminal state reached for (SSO)


上記確認後にActive機再起動

COL301# reload slot 1                               # 1号機再起動

COL301# show switch

COL301# show processes cpu switch 1

Load for five secs: 0%/100%; one minute: 3%; five minutes: 2% Time source is NTP, 16:02:58.456 JST Tue Dec 6 2022 
Core 0: CPU utilization for five seconds: 7%; one minute: 8%; five minutes: 8% 
Core 1: CPU utilization for five seconds: 0%; one minute: 0%; five minutes: 0% 
Core 2: CPU utilization for five seconds: 2%; one minute: 1%; five minutes: 1% 
Core 3: CPU utilization for five seconds: 0%; one minute: 1%; five minutes: 1%

COL301# show processes cpu switch 2
Load for five secs: 3%/0%; one minute: 3%; five minutes: 2% Time source is NTP, 16:03:16.293 JST Tue Dec 6 2022
Core 0: CPU utilization for five seconds: 9%; one minute: 6%; five minutes: 7% 
Core 1: CPU utilization for five seconds: 0%; one minute: 0%; five minutes: 0% 
Core 2: CPU utilization for five seconds: 1%; one minute: 1%; five minutes: 1% 
Core 3: CPU utilization for five seconds: 0%; one minute: 2%; five minutes: 1%


90%を超えるCPUがない事。
COL301# show processes cpu detailed process fed sort | ex 0.0
Core 0: CPU utilization for five seconds: 20%; one minute: 25%; five minutes: 26%
Core 1: CPU utilization for five seconds: 9%; one minute: 19%; five minutes: 35% 
Core 2: CPU utilization for five seconds: 98%; one minute: 83%; five minutes: 43% 
Core 3: CPU utilization for five seconds: 8%; one minute: 24%; five minutes: 47%
PID T C TID Runtime(ms) Invoked uSecs 5Sec 1Min 5Min TTY Process (%) (%) (%)
5715 L 854223 1999768 345 27.96 27.48 27.54 0 fed <<<< 
5715 L 2 17632 1034530 1534348 0 24.53 24.15 24.10 0 PunjectRx <<<<


# show ip interface brief
# show ru
# copy running-config startup-config



# CRL301を再起動した時のログ

CRL301#show switch
Load for five secs: 3%/0%; one minute: 3%; five minutes: 3%
Time source is NTP, 14:56:47.679 JST Wed Dec 7 2022

Switch/Stack Mac Address : 0042.5a7e.8880 - Local Mac Address
Mac persistency wait time: Indefinite
                                             H/W   Current
Switch#   Role    Mac Address     Priority Version  State
------------------------------------------------------------
*1       Active   0042.5a7e.8880     15     V07     Ready
 2       Standby  00a7.4280.a800     10     V07     Ready

CRL301# reload slot 2
Proceed with reload? [confirm]
CRL301#show switch
Load for five secs: 2%/0%; one minute: 3%; five minutes: 3%
Time source is NTP, 14:57:38.739 JST Wed Dec 7 2022

Switch/Stack Mac Address : 0042.5a7e.8880 - Local Mac Address
Mac persistency wait time: Indefinite
                                             H/W   Current
Switch#   Role    Mac Address     Priority Version  State
------------------------------------------------------------
*1       Active   0042.5a7e.8880     15     V07     Ready
 2       Standby  00a7.4280.a800     10     V07     Ready

CRL301#show switch
Load for five secs: 2%/0%; one minute: 3%; five minutes: 3%
Time source is NTP, 14:57:40.783 JST Wed Dec 7 2022

Switch/Stack Mac Address : 0042.5a7e.8880 - Local Mac Address
Mac persistency wait time: Indefinite
                                             H/W   Current
Switch#   Role    Mac Address     Priority Version  State
------------------------------------------------------------
*1       Active   0042.5a7e.8880     15     V07     Ready
 2       Standby  00a7.4280.a800     10     V07     Sync not started

CRL301#show switch
Load for five secs: 7%/0%; one minute: 4%; five minutes: 3%
Time source is NTP, 14:57:46.154 JST Wed Dec 7 2022

Switch/Stack Mac Address : 0042.5a7e.8880 - Local Mac Address
Mac persistency wait time: Indefinite
                                             H/W   Current
Switch#   Role    Mac Address     Priority Version  State
------------------------------------------------------------
*1       Active   0042.5a7e.8880     15     V07     Ready
 2       Member   0000.0000.0000     0      0       Removed

CRL301#show switch
Load for five secs: 5%/1%; one minute: 3%; five minutes: 3%
Time source is NTP, 15:01:55.270 JST Wed Dec 7 2022

Switch/Stack Mac Address : 0042.5a7e.8880 - Local Mac Address
Mac persistency wait time: Indefinite
                                             H/W   Current
Switch#   Role    Mac Address     Priority Version  State
------------------------------------------------------------
*1       Active   0042.5a7e.8880     15     V07     Ready
 2       Member   00a7.4280.a800     10     V07     Syncing

CRL301#show switch
Load for five secs: 1%/0%; one minute: 3%; five minutes: 3%
Time source is NTP, 15:02:35.511 JST Wed Dec 7 2022

Switch/Stack Mac Address : 0042.5a7e.8880 - Local Mac Address
Mac persistency wait time: Indefinite
                                             H/W   Current
Switch#   Role    Mac Address     Priority Version  State
------------------------------------------------------------
*1       Active   0042.5a7e.8880     15     V07     Ready
 2       Member   00a7.4280.a800     10     V07     Ready

CRL301#show switch
Load for five secs: 5%/0%; one minute: 3%; five minutes: 3%
Time source is NTP, 15:04:11.033 JST Wed Dec 7 2022

Switch/Stack Mac Address : 0042.5a7e.8880 - Local Mac Address
Mac persistency wait time: Indefinite
                                             H/W   Current
Switch#   Role    Mac Address     Priority Version  State
------------------------------------------------------------
*1       Active   0042.5a7e.8880     15     V07     Ready
 2       Standby  00a7.4280.a800     10     V07     HA sync in progress

CRL301#show switch
Load for five secs: 3%/0%; one minute: 6%; five minutes: 4%
Time source is NTP, 15:05:42.707 JST Wed Dec 7 2022

Switch/Stack Mac Address : 0042.5a7e.8880 - Local Mac Address
Mac persistency wait time: Indefinite
                                             H/W   Current
Switch#   Role    Mac Address     Priority Version  State
------------------------------------------------------------
*1       Active   0042.5a7e.8880     15     V07     Ready
 2       Standby  00a7.4280.a800     10     V07     Ready

CRL301#show logging
Load for five secs: 6%/0%; one minute: 5%; five minutes: 4%
Time source is NTP, 15:06:17.472 JST Wed Dec 7 2022

Syslog logging: enabled (0 messages dropped, 12 messages rate-limited, 0 flushes, 0 overruns, xml disabled, filtering disabled)
No Active Message Discriminator.
No Inactive Message Discriminator.
.
.
.
System has been configured (CRL301-2)
Dec  7 15:05:31.330: %SYS-5-RESTART: System restarted -- (CRL301-2)
Cisco IOS Software, IOS-XE Software, Catalyst L3 Switch Software (CAT3K_CAA-UNIVERSALK9-M), Version 03.07.04E RELEASE SOFTWARE (fc1) (CRL301-2)
Technical Support: http://www.cisco.com/techsupport (CRL301-2)
Copyright (c) 1986-2016 by Cisco Systems, Inc. (CRL301-2)
Compiled Thu 19-May-16 11:48 by prod_rel_team (CRL301-2)
Dec  7 15:05:31.338: %AUTHMGR_SPI-6-START: Auth Manager SPI server started (CRL301-2)
Dec  7 15:05:31.343: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0, changed state to down (CRL301-2)
Dec  7 15:05:31.456: %SSH-5-ENABLED: SSH 2.0 has been enabled (CRL301-2)
Dec  7 15:05:37.410: %HA_CONFIG_SYNC-6-BULK_CFGSYNC_SUCCEED: Bulk Sync succeeded
Dec  7 15:05:36.635: %SPANTREE-6-PORTDEL_ALL_VLANS: GigabitEthernet1/0/23 deleted from all Vlans  (CRL301-2)
Dec  7 15:05:36.640: %SPANTREE-6-PORTDEL_ALL_VLANS: GigabitEthernet2/0/23 deleted from all Vlans  (CRL301-2)
Dec  7 15:05:38.396: %RF-5-RF_TERMINAL_STATE: 1 ha_mgr:  Terminal state reached for (SSO)


CRL301#reload slot 1

System configuration has been modified. Save? [yes/no]: yes
Building configuration...
Compressed configuration from 6940 bytes to 3197 bytes[OK]
Proceed with reload? [confirm]
CRL301#Write failed: Broken pipe

# ssh -l nwadmin 192.168.25.21
Password:
CRL301>enable
Password:
CRL301#show switch
Load for five secs: 4%/0%; one minute: 5%; five minutes: 3%
Time source is NTP, 15:15:49.507 JST Wed Dec 7 2022

Switch/Stack Mac Address : 0042.5a7e.8880 - Foreign Mac Address
Mac persistency wait time: Indefinite
                                             H/W   Current
Switch#   Role    Mac Address     Priority Version  State 
------------------------------------------------------------
 1       Member   0000.0000.0000     0      0       Removed             
*2       Active   00a7.4280.a800     10     V07     Ready               

CRL301#show switch
Load for five secs: 4%/0%; one minute: 6%; five minutes: 4%
Time source is NTP, 15:19:01.750 JST Wed Dec 7 2022

Switch/Stack Mac Address : 0042.5a7e.8880 - Local Mac Address
Mac persistency wait time: Indefinite
                                             H/W   Current
Switch#   Role    Mac Address     Priority Version  State 
------------------------------------------------------------
 1       Member   0042.5a7e.8880     15     V07     Syncing             
*2       Active   00a7.4280.a800     10     V07     Ready               

CRL301#show switch
Load for five secs: 26%/22%; one minute: 8%; five minutes: 5%
Time source is NTP, 15:20:10.911 JST Wed Dec 7 2022

Switch/Stack Mac Address : 0042.5a7e.8880 - Local Mac Address
Mac persistency wait time: Indefinite
                                             H/W   Current
Switch#   Role    Mac Address     Priority Version  State 
------------------------------------------------------------
 1       Member   0042.5a7e.8880     15     V07     Ready               
*2       Active   00a7.4280.a800     10     V07     Ready               

CRL301#show switch
Load for five secs: 3%/0%; one minute: 5%; five minutes: 5%
Time source is NTP, 15:20:58.372 JST Wed Dec 7 2022

Switch/Stack Mac Address : 0042.5a7e.8880 - Local Mac Address
Mac persistency wait time: Indefinite
                                             H/W   Current
Switch#   Role    Mac Address     Priority Version  State 
------------------------------------------------------------
 1       Standby  0042.5a7e.8880     15     V07     HA sync in progress 
*2       Active   00a7.4280.a800     10     V07     Ready               

CRL301#show switch
Load for five secs: 7%/0%; one minute: 8%; five minutes: 6%
Time source is NTP, 15:22:38.445 JST Wed Dec 7 2022

Switch/Stack Mac Address : 0042.5a7e.8880 - Local Mac Address
Mac persistency wait time: Indefinite
                                             H/W   Current
Switch#   Role    Mac Address     Priority Version  State 
------------------------------------------------------------
 1       Standby  0042.5a7e.8880     15     V07     Ready               
*2       Active   00a7.4280.a800     10     V07     Ready               

CRL301#show logging
Load for five secs: 3%/0%; one minute: 8%; five minutes: 6%
Time source is NTP, 15:22:46.589 JST Wed Dec 7 2022

Syslog logging: enabled (0 messages dropped, 5 messages rate-limited, 0 flushes, 0 overruns, xml disabled, filtering disabled)
No Active Message Discriminator.
No Inactive Message Discriminator.
.
.
.
.
System has been configured (CRL301-1)
Dec  7 15:22:23.059: %SYS-5-RESTART: System restarted -- (CRL301-1)
Cisco IOS Software, IOS-XE Software, Catalyst L3 Switch Software (CAT3K_CAA-UNIVERSALK9-M), Version 03.07.04E RELEASE SOFTWARE (fc1) (CRL301-1)
Technical Support: http://www.cisco.com/techsupport (CRL301-1)
Copyright (c) 1986-2016 by Cisco Systems, Inc. (CRL301-1)
Compiled Thu 19-May-16 11:48 by prod_rel_team (CRL301-1)
Dec  7 15:22:23.067: %AUTHMGR_SPI-6-START: Auth Manager SPI server started (CRL301-1)
Dec  7 15:22:23.072: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0, changed state to down (CRL301-1)
Dec  7 15:22:23.187: %SSH-5-ENABLED: SSH 2.0 has been enabled (CRL301-1)
Dec  7 15:22:29.923: %HA_CONFIG_SYNC-6-BULK_CFGSYNC_SUCCEED: Bulk Sync succeeded
Dec  7 15:22:29.149: %SPANTREE-6-PORTDEL_ALL_VLANS: GigabitEthernet1/0/23 deleted from all Vlans  (CRL301-1)
Dec  7 15:22:29.150: %SPANTREE-6-PORTDEL_ALL_VLANS: GigabitEthernet2/0/23 deleted from all Vlans  (CRL301-1)
Dec  7 15:22:30.910: %RF-5-RF_TERMINAL_STATE: 2 ha_mgr:  Terminal state reached for (SSO)

RL301# show processes cpu switch 1 detailed process fed sort | ex 0.0
Load for five secs: 4%/1%; one minute: 12%; five minutes: 13%
Time source is NTP, 15:37:47.396 JST Wed Dec 7 2022
Core 0: CPU utilization for five seconds: 7%; one minute: 5%; five minutes: 8%
Core 1: CPU utilization for five seconds: 0%; one minute: 0%; five minutes: 3%
Core 2: CPU utilization for five seconds: 0%; one minute: 0%; five minutes: 3%
Core 3: CPU utilization for five seconds: 1%; one minute: 0%; five minutes: 3%
PID    T C  TID    Runtime(ms) Invoked uSecs  5Sec      1Min     5Min     TTY   Process
                                               (%)       (%)      (%)                  
6268   L           44670       304375  146    0.54      0.50    0.59    1088  fed                
6268   L 2  6716   1710        19019   0      0.25      0.20    0.19    0     fed-ots-main       

CRL301# show processes cpu switch 2 detailed process fed sort | ex 0.0
Load for five secs: 3%/0%; one minute: 11%; five minutes: 13%
Time source is NTP, 15:37:56.144 JST Wed Dec 7 2022
Core 0: CPU utilization for five seconds: 9%; one minute: 6%; five minutes: 6%
Core 1: CPU utilization for five seconds: 0%; one minute: 1%; five minutes: 1%
Core 2: CPU utilization for five seconds: 9%; one minute: 2%; five minutes: 1%
Core 3: CPU utilization for five seconds: 0%; one minute: 0%; five minutes: 1%
PID    T C  TID    Runtime(ms) Invoked uSecs  5Sec      1Min     5Min     TTY   Process
                                               (%)       (%)      (%)                  
6269   L           63600       484607  131    0.78      0.64    0.58    1088  fed                
6269   L 0  6720   17210       3515    0      0.24      0.24    0.24    0     fed-ots-nfl        
6269   L 3  6717   2140        31602   0      0.15      0.16    0.15    1088  fed-ots-main       

CRL301#


シャットダウン時の後処理 (shutdown)

# vi /etc/systemd/system/drop.service [Unit] Description= stop httpgwd DefaultDependencies=no Before=shutdown.target RefuseManualStart=true ...