meta data for this page
  •  

Különbségek

A kiválasztott változat és az aktuális verzió közötti különbségek a következők.

Összehasonlító nézet linkje

Előző változat mindkét oldalonElőző változat
shell:riportok:napi_riport [2025/05/12 14:56] adminshell:riportok:napi_riport [2025/07/01 11:29] (aktuális) admin
Sor 10: Sor 10:
 ################################################################ ################################################################
 #                                                              # #                                                              #
-#  TSM napi riport - tsm_napi_riport.sh v4.(2024.05.29.)     #+#  TSM napi riport - tsm_napi_riport.sh v5.(2025.07.01.)     #
 #  Keszitette: Agoston Peter                                   # #  Keszitette: Agoston Peter                                   #
 #  Web: http://agostonpeter.com/tsm-turi                       # #  Web: http://agostonpeter.com/tsm-turi                       #
 #                                                              # #                                                              #
 ################################################################ ################################################################
-SCRIPT_VER="v4.(2024.05.29.)"+SCRIPT_VER="v5.(2025.07.01.)"
 # Riport cimzett(ek) # Riport cimzett(ek)
 # Milyen email cim(ek)re menjen a riport # Milyen email cim(ek)re menjen a riport
Sor 65: Sor 65:
 #SQL_LICENSZ_HASZNALATOK='select cast(FRONTEND_CAP/1024/1024 as decimal (8,2)) as "Front-End TB",substr(FRONTEND_CAP_DATE,1,19) as "Front-End Date",FRONTEND_CLIENT_COUNT as "Front-End client count",cast(TOTALSUROCC_TB as decimal (8,2)) as "SUR TB",cast(TOTALSURRETOCC_TB as decimal(8,2)) as "SUR retain TB",SUROCC_DATE as "SUR occupancy date" from status' #SQL_LICENSZ_HASZNALATOK='select cast(FRONTEND_CAP/1024/1024 as decimal (8,2)) as "Front-End TB",substr(FRONTEND_CAP_DATE,1,19) as "Front-End Date",FRONTEND_CLIENT_COUNT as "Front-End client count",cast(TOTALSUROCC_TB as decimal (8,2)) as "SUR TB",cast(TOTALSURRETOCC_TB as decimal(8,2)) as "SUR retain TB",SUROCC_DATE as "SUR occupancy date" from status'
 SQL_UTOLSO24H_ADATMOZGASAI="select nn.domain_name,summary.activity, sum(cast(summary.bytes/1024/1024/1024 as decimal(6,2))) as GB from nodes as nn, summary where (end_time between current_timestamp - 24 hours and current_timestamp) and (activity='BACKUP' or activity='RESTORE' or activity='ARCHIVE' or activity='RETRIEVE') and ((nn.node_name=summary.entity)) group by domain_name,summary.activity order by activity,domain_name asc" SQL_UTOLSO24H_ADATMOZGASAI="select nn.domain_name,summary.activity, sum(cast(summary.bytes/1024/1024/1024 as decimal(6,2))) as GB from nodes as nn, summary where (end_time between current_timestamp - 24 hours and current_timestamp) and (activity='BACKUP' or activity='RESTORE' or activity='ARCHIVE' or activity='RETRIEVE') and ((nn.node_name=summary.entity)) group by domain_name,summary.activity order by activity,domain_name asc"
-SQL_UTOLSO24H_AKTIVITASAI="SELECT activity, cast(float(sum(bytes))/1024/1024/1024 as dec(8,2)) as \"GB\" FROM summary WHERE end_time>current_timestamp-24 hours and activity<>'EXPIRATION' and bytes>0 GROUP BY activity"+SQL_UTOLSO24H_AKTIVITASAI="SELECT activity, cast(float(sum(bytes))/1024/1024/1024 as dec(12,2)) as \"GB\" FROM summary WHERE end_time>current_timestamp-24 hours and activity<>'EXPIRATION' and bytes>0 GROUP BY activity"
 SQL_3X_MISSED="select substr(a.node_name,1,20) as \"NODE NAME\", substr(a.schedule_name,1,25) as SCHEDULE, substr(b.contact,1,20) as \"CONTACT\", substr(char(count(*)),1,4) as \"3 DAY COUNT\",(days(current_timestamp)-days(b.lastacc_time)) as \"LAST SEEN\" from EVENTS a, nodes b where (a.scheduled_start >=current_timestamp - 3 days) and a.node_name=b.node_name and a.status='Missed' and a.node_name is not NULL and a.schedule_name not like 'RMAN_%%_LOG%%' and a.schedule_name not like 'SQL_%%_LOG%%' group by a.node_name, a.schedule_name, b.contact, b.lastacc_time having count(*)>=3 order by \"3 DAY COUNT\" desc" SQL_3X_MISSED="select substr(a.node_name,1,20) as \"NODE NAME\", substr(a.schedule_name,1,25) as SCHEDULE, substr(b.contact,1,20) as \"CONTACT\", substr(char(count(*)),1,4) as \"3 DAY COUNT\",(days(current_timestamp)-days(b.lastacc_time)) as \"LAST SEEN\" from EVENTS a, nodes b where (a.scheduled_start >=current_timestamp - 3 days) and a.node_name=b.node_name and a.status='Missed' and a.node_name is not NULL and a.schedule_name not like 'RMAN_%%_LOG%%' and a.schedule_name not like 'SQL_%%_LOG%%' group by a.node_name, a.schedule_name, b.contact, b.lastacc_time having count(*)>=3 order by \"3 DAY COUNT\" desc"
 SQL_QUERY_PROC_V6="SELECT process_num, substr(process,1,20) as PROCESS, substr(char(start_time),1,19) AS START_TIME,substr(char(day(current_timestamp - start_time)),1,2) AS \"(D)\" ,substr(char((current_timestamp - start_time)hours),1,2) AS \"(HH)\", substr(char((current_timestamp - start_time)minutes),1,2) AS \"(MM)\", cast(float(bytes_processed/1024/1024) AS DEC(12,2)) AS MB, cast((cast(bytes_processed as dec(18,0))/cast(timestampdiff(2,char(current_timestamp-start_time)) as decimal(18,0))) / 1024 / 1024 AS DEC (18,2)) AS \"MB/s\" FROM processes" SQL_QUERY_PROC_V6="SELECT process_num, substr(process,1,20) as PROCESS, substr(char(start_time),1,19) AS START_TIME,substr(char(day(current_timestamp - start_time)),1,2) AS \"(D)\" ,substr(char((current_timestamp - start_time)hours),1,2) AS \"(HH)\", substr(char((current_timestamp - start_time)minutes),1,2) AS \"(MM)\", cast(float(bytes_processed/1024/1024) AS DEC(12,2)) AS MB, cast((cast(bytes_processed as dec(18,0))/cast(timestampdiff(2,char(current_timestamp-start_time)) as decimal(18,0))) / 1024 / 1024 AS DEC (18,2)) AS \"MB/s\" FROM processes"