Código de Otros - show process Openvms

<<>>
Imágen de perfil
Val: 20
Ha aumentado su posición en 2 puestos en Otros (en relación al último mes)
Gráfica de Otros

show process Openvmsgráfica de visualizaciones


Otros

Actualizado el 14 de Enero del 2020 por Edgar (Publicado el 13 de Enero del 2020)
331 visualizaciones desde el 13 de Enero del 2020
Este programa permite examinar a detalle un proceso en ejecución bajo el sistema operativo open vms

Requerimientos

Sistema operativo Openvms

1

Actualizado el 14 de Enero del 2020 (Publicado el 13 de Enero del 2020)gráfica de visualizaciones de la versión: 1
331 visualizaciones desde el 13 de Enero del 2020
estrellaestrellaestrellaestrellaestrella
estrellaestrellaestrellaestrella
estrellaestrellaestrella
estrellaestrella
estrella

DCL for ovms
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
$!----------------------------------------------------------------------------
$!
Edgar Ulloa--- panamá  for LWP
$!
$!                              Proceso.COM
$! Watches specified process for the quota remaining and highlights low lines
$!
$!----------------------------------------------------------------------------
$ on control_y then exit
$ on error then exit
$ on warning then exit
$ margin        = "   "
$ gap           = " |   "
$ threshold     = 50
$ esc[0,7] = 27
$ bar_line      = f$fao("!80*_")
$ blank_line    = f$fao("!80* ")
$ margin_line   = margin+f$fao("!36* ")+"|"+f$fao("!10* ")
$ heading       = "Resource    Unused   Quota     %   "
$ start_screen  = "''esc'[2J"
$ cursor_dwell  = "''esc'[21;0H"
$ highlight     = "''esc'[7m"
$ lights_off    = "''esc'[0m"
$ ws = "write sys$output"
$ if p1 .EQS. "" then inquire/nopunc p1 "Dame el id: "
$ pid          = p1
$ xyzxyz = f$getjpi(pid,"USERNAME")     ! Catches if PID is valid
$ on control_y then goto the_end
$ on error then goto the_end
$ on warning then goto the_end
$ ws start_screen
$!
$!      START MAIN PROGRAM
$!
$ start_new_display:
$ ws "''esc'[0;0H''bar_line'"
$ ws " ESPULGA PROCESOS" + f$fao("!44* ") + "TECNASA-ULLOA"
$ ws blank_line
$ ws "''margin'       Process Name ''f$getjpi(pid,""PRCNAM"")'" + -
  "           Process Id ''pid'"
$ ws "''margin'       Images Invoked so far " + -
  f$fao("!#(#AS)",1,17,"''f$getjpi(pid,""IMAGECOUNT"")'") + -
     "Username   ''f$getjpi(pid,""USERNAME"")'"
$ ws blank_line
$ ws "Current image "+f$fao("!#(#AS)",1,60,f$getjpi(pid,"IMAGNAME"))
$ ws blank_line
$ ws "''margin'         Time ''f$time()'        Process State     " + -
  f$getjpi(pid,"STATE") + "       "
$ ws "''margin'         Page faults "+f$fao("!#(#AS)",1,24,-
     "''f$getjpi(pid,""PAGEFLTS"")'")+"Pages Available "+f$fao("!#(#AS)",1,10,-
     "''f$getjpi(pid,""FREPTECNT"")'")
$ ws bar_line
$ ws "PROCESS RESOURCE QUOTAS"
$ ws "''margin'''heading'''gap'''heading'"
$ ws margin_line
$ set message /nofac/noid/notext/nosev
$ call do_line -
       "CPU limit " "CPUTIM" "CPULIM" "+" "Direct I/O" "DIOCNT" "DIOLM" "+"
$ call do_line -
       "Byte limit" "BYTCNT" "BYTLM"  "+" "Buff I/O  " "BIOCNT" "BIOLM" "+"
$ call do_line -
       "Timer Q   " "TQCNT"  "TQLM"   "+" "File Lim  " "FILCNT" "FILLM" "+"
$ call do_line "Page file " -
       "PAGFILCNT" "PGFLQUOTA"        "+" "Sub-proc's" "PRCCNT" "PRCLM" "-"
$ call do_line -
       "Enqueue   " "ENQCNT" "ENQLM"  "+" "AST limit" "ASTCNT" "ASTLM" "+"
$ call do_line "WS Current" "WSSIZE" "WSAUTHEXT" "-" "x"
$ set message /fac/id/text/sev
$ ws margin_line
$ ws bar_line
$ ws cursor_dwell
$ wait 00:00:02.00
$ goto start_new_display
$!
$! THE PLACE FOR THE CLEANUP OF THE TERMINAL
$!
$ the_end:
$ set message /fac/id/text/sev
$ set term/inqu
$ ws cursor_dwell
$ exit
$!
$! THAT'S IT !!!
$!
$! SUBROUTINE to catch a quota and put into character string
$ get_1_quota:
$ SUBROUTINE
$ on error then exit 2
$ on warning then exit 2
$ on control_y then exit 2
$ spaces =    "                  "
$ if p1 .EQS. "x" then goto its_blank
$ remain =    f$getjpi(pid,"''p2'")
$ quota  =    f$getjpi(pid,"''p3'")
$ if p4 .EQS. "-" then remain = quota - remain
$ if quota .NE. 0 then percent = (remain * 100)/quota
$ remain  = f$extract(0,8-F$length("''remain'")  ,"''spaces'")+"''remain'"
$ quota   = f$extract(0,8-F$length("''quota'")   ,"''spaces'")+"''quota'"
$ percent = f$extract(0,5-F$length("''percent'") ,"''spaces'")+"''percent'"
$ message = "''p1'" + f$extract(0,10-F$length("''p1'")       ,"''spaces'")
$ alarm = lights_off
$ if percent .LT. threshold then alarm = highlight
$ if quota .EQ. 0 then alarm = lights_off
$ if quota .EQ. 0 then percent = "  ---"
$ return_string == -
  "''alarm'''message'''remain'''quota'''percent'%''lights_off'   "
$ exit
$ its_blank:
$ return_string == f$fao("!37* ")
$ exit
$ ENDSUBROUTINE
$!
$!      SUBROUTINE TO FORMAT TWO STRING INTO A LINE
$!
$ do_line:
$ SUBROUTINE
$ on error then exit 2
$ on warning then exit 2
$ on control_y then exit 2
$ call get_1_quota "''p1'" "''p2'" "''p3'" "''p4'"
$ text_line = return_string
$ call get_1_quota "''p5'" "''p6'" "''p7'" "''p8'"
$ text_line = "''margin'''text_line'''gap'''return_string'"
$ ws text_line
$ exit
$ ENDSUBROUTINE



Comentarios sobre la versión: 1 (0)


No hay comentarios
 

Comentar la versión: 1

Nombre
Correo (no se visualiza en la web)
Valoración
Comentarios
Es necesario revisar y aceptar las políticas de privacidad

http://lwp-l.com/s5812