重庆思庄Oracle、Redhat认证学习论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 442|回复: 0
打印 上一主题 下一主题

CACHE 数据库控制台命令的使用

[复制链接]
跳转到指定楼层
楼主
发表于 2023-10-19 13:01:23 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
--1.进入控制台
[root@cache-server ~]# ccontrol session cyyy

--2.列出多少名字空间

USER>DO ##class(%SYS.Namespace).ListAll(.result)

USER>zw result                                 
result("%SYS")=""
result("DOCBOOK")=""
result("SAMPLES")=""
result("USER")=""


--3.切换NS

USER>zn "SAMPLES"

SAMPLES>

--4.进行备份
--切换到SYS
SAMPLES>zn "%sys"


%SYS>DO ^BACKUP


1) Backup
2) Restore ALL
3) Restore Selected or Renamed Directories
4) Edit/Display List of Directories for Backups
5) Abort Backup
6) Display Backup volume information
7) Monitor progress of backup or restore

Option? 1


*** The time is: 2023-10-19 11:17:51 ***

                 Cache Backup Utility
              --------------------------
What kind of backup:
   1. Full backup of all in-use blocks
   2. Incremental since last backup
   3. Cumulative incremental since last full backup
   4. Exit the backup program
1 => 1
Specify output device (type STOP to exit)
Device: /tmp/cyyy/mgr/1 =>
File exists, do you want to overwrite it <N>?y
Backing up to device: /tmp/cyyy/mgr/1
Description: TEST


Backing up the following directories:
/tmp/cyyy/mgr/
/tmp/cyyy/mgr/cacheaudit/
/tmp/cyyy/mgr/user/


Start the Backup (y/n)? => y
Journal file switched to:
/tmp/cyyy/mgr/journal/20231019.004


Starting backup pass 1
Backing up /tmp/cyyy/mgr/ at 10/19/2023 11:18:14
Copied 7601 blocks in 0.616 seconds

Finished this pass of copying /tmp/cyyy/mgr/

Backing up /tmp/cyyy/mgr/cacheaudit/ at 10/19/2023 11:18:17
Copied 84 blocks in 0.004 seconds

Finished this pass of copying /tmp/cyyy/mgr/cacheaudit/

Backing up /tmp/cyyy/mgr/user/ at 10/19/2023 11:18:19
Copied 71 blocks in 0.006 seconds

Finished this pass of copying /tmp/cyyy/mgr/user/

Backup pass 1 complete at 10/19/2023 11:18:19

Starting backup pass 2
Backing up /tmp/cyyy/mgr/ at 10/19/2023 11:18:21
Copied 1 blocks in 0.002 seconds

Finished this pass of copying /tmp/cyyy/mgr/

Backing up /tmp/cyyy/mgr/cacheaudit/ at 10/19/2023 11:18:23
Copied 1 blocks in 0.001 seconds

Finished this pass of copying /tmp/cyyy/mgr/cacheaudit/

Backing up /tmp/cyyy/mgr/user/ at 10/19/2023 11:18:25
Copied 1 blocks in 0.001 seconds

Finished this pass of copying /tmp/cyyy/mgr/user/

Backup pass 2 complete at 10/19/2023 11:18:25

Starting backup pass 3

Journal file '/tmp/cyyy/mgr/journal/20231019.003' and the subsequent ones are required for recovery purpose if the backup were to be restored

Journal marker set at
offset 197048 of /tmp/cyyy/mgr/journal/20231019.004

- This is the last pass - Suspending write daemon
Backing up /tmp/cyyy/mgr/ at 10/19/2023 11:18:27
Copied 1 blocks in 0.000 seconds

Finished this pass of copying /tmp/cyyy/mgr/

Backing up /tmp/cyyy/mgr/cacheaudit/ at 10/19/2023 11:18:27
Copied 1 blocks in 0.000 seconds

Finished this pass of copying /tmp/cyyy/mgr/cacheaudit/

Backing up /tmp/cyyy/mgr/user/ at 10/19/2023 11:18:27
Copied 1 blocks in 0.001 seconds

Finished this pass of copying /tmp/cyyy/mgr/user/

Backup pass 3 complete at 10/19/2023 11:18:27

***FINISHED BACKUP***

Global references are enabled.

Backup complete.


1) Backup
2) Restore ALL
3) Restore Selected or Renamed Directories
4) Edit/Display List of Directories for Backups
5) Abort Backup
6) Display Backup volume information
7) Monitor progress of backup or restore

Option? 6

Enter the backup volume you want to display information from
(Type STOP to exit)
Device: /tmp/cyyy/mgr/1 =>

This backup volume was created by:
Cache for UNIX (Red Hat Enterprise Linux for x86-64) 2016.2 (Build 736U) Fri Sep 30 2016 12:25:56 EDT

The volume label contains:
   Volume number       1
   Volume backup       OCT 19 2023 11:18AM Full
   Previous backup     OCT 10 2023 07:52PM Full
   Last FULL backup    OCT 10 2023 07:52PM
   Description         TEST
   Buffer Count        0
   Journal File        /tmp/cyyy/mgr/journal/20231019.003
   Log file            /tmp/cyyy/mgr/cachebackup.log
   Backup Status       Completed

Database                                Size(mb)
--------                                --------
/tmp/cyyy/mgr/                               170
/tmp/cyyy/mgr/cacheaudit/                      1
/tmp/cyyy/mgr/user/                            1
Total of 3 databases, totaling 172 mb
Backup volume size is 63 mb

Enter the backup volume you want to display information from
(Type STOP to exit)
Device: /tmp/cyyy/mgr/1 => stOP


1) Backup
2) Restore ALL
3) Restore Selected or Renamed Directories
4) Edit/Display List of Directories for Backups
5) Abort Backup
6) Display Backup volume information
7) Monitor progress of backup or restore

Option? quit

%SYS>

--5.看系统状态

%SYS>d ^%SS   

                   Cache System Status: 11:30 am 19 Oct 2023
Process  Device      Namespace      Routine         CPU,Glob  Pr User/Location
    6359                             CONTROL           0,0     -4
    6360                             WRTDMN           23,110   -3
    6361                             GARCOL            0,0     -2
    6362                             JRNDMN          880,0     0  
    6370                             EXPDMN            0,0     0  
    6365                             SWRTDMN           1,6     -3
    6363                             SWRTDMN           1,6     -3
    6364                             SWRTDMN           1,6     -3
    6366                             SWRTDMN           1,6     -3
    6367                             SWRTDMN           1,6     -3
    6369                             SWRTDMN           1,6     -3
    6368                             SWRTDMN           1,6     -3
    6582* /dev/pts/2  %SYS           %SYS.ProcessQuery
                                                   28851,942   0  Admin
    6372  /dev/null   %SYS           MONITOR        7019,68    0  
    6373  /dev/null   %SYS           CLNDMN          207,17    0  
    6375  /dev/null   %SYS           RECEIVE        3014,165   0  
    6376  /dev/null   %SYS           ECPWork           0,0     0  ECPWORK
    6377  |TCP|1972   %SYS           %SYS.SERVER       0,0     0  

Press Q or q to quit, any other character to continue.

Process  Device      Namespace      Routine         CPU,Glob  Pr User/Location
    6379  /dev/null   %SYS           LMFMON          213,29    0  
    6540  /dev/null   %SYS           %SYS.Monitor.Control
                                                  324349,6115  0  
    6539  /dev/null   %SYS           %SYS.TaskSuper10726,442   0  TASKMGR

2 user, 19 system, 956 mb global/33 mb routine cache

--6.全局统计

%SYS>d ^GLOSTAT

Should detailed statistics be displayed for each block type? No =>yes

Statistics                                                                Total
--------------                                                        ---------
Global references (all):                                                 38,193
Global update references:                                                 8,293
Private global references:                                                6,034
Private update references:                                                2,795
Routine calls:                                                           20,399
Routine buffer loads & saves:                                               348
Routine commands:                                                       637,040
Routine not cached:                                                          93
Cache Efficiency:                                                            29
Journal Entries:                                                             54
Journal Block Writes:                                                         5
Logical Block Requests        Data:               21,101
   Dir:              609      Upper ptr:             964
   BData:            817      Bottom ptr:          1,309
   Map:               68      Other:                  34                 24,902
Physical Block Reads          Data:                  295
   Dir:                6      Upper ptr:               4
   BData:            809      Bottom ptr:             28
   Map:                4      Other:                   4                  1,169
Database Physical Block Writes                                              154
WIJ Physical Block Writes                                                    96
Blocks Queued to be Written   Data:                   83
   Dir:                4      Upper ptr:               5
   BData:              0      Bottom ptr:             40
   Map:                8      Other:                  23                    163
Object cache
   Hit:            4,798
   Miss:              46
   Load:             126
Object references (OREFs)
   Newed:            752
   Del:              747

Continue (c), zero statistics (z), timed stats (# sec > 0), quit?  


--7.收集信息给支持

<NOROUTINE> *buttons
%SYS>d ^Buttons


Diagnostic Report Build # 084 Evidence Logging Tool

This reporting tool provides the information required for InterSystems
Technical Support to analyze most issues. Please send the resulting file with
each and every new problem sent to Support.

This process will take approximately 5 minutes to complete. Please be patient.

Continue (Y)?

Collecting information, please do not interrupt this process.

Please wait approximately 30 seconds for %SS snapshots.
Please wait approximately 30 seconds for "ps" snapshots.
Please wait approximately 1 minute for "cstat" snapshots.

GloStat information now being collected.
Please wait approximately 1 minute and 40 seconds.

Log file saved to: /tmp/cyyy/mgr/license202310191136.html, 555,842 bytes
Upload the file(s) above to InterSystems Support.
%SYS>

--8.收集概要信息

%SYS>d ^pButtons

Current log directory: /tmp/cyyy/mgr/
Available profiles:
     1  12hours     - 12 hour run sampling every 10 seconds
     2  24hours     - 24 hour run sampling every 10 seconds
     3  30mins      - 30 minute run sampling every 1 second
     4  4hours      - 4 hour run sampling every 5 seconds
     5  8hours      - 8 hour run sampling every 10 seconds
     6  test        - A 5 minute TEST run sampling every 30 seconds

select profile number to run: 1
Collection of this sample data will be available in 43320 seconds.
The runid for this data is 20231019_120556_12hours.

分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 支持支持 反对反对
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|手机版|小黑屋|重庆思庄Oracle、Redhat认证学习论坛 ( 渝ICP备12004239号-4 )

GMT+8, 2024-5-8 05:38 , Processed in 0.081281 second(s), 19 queries .

重庆思庄学习中心论坛-重庆思庄科技有限公司论坛

© 2001-2020

快速回复 返回顶部 返回列表