Index: /branches/rel_apv_10_7/usr/click/lib/libparser/commands.pm
===================================================================
--- /branches/rel_apv_10_7/usr/click/lib/libparser/commands.pm	(revision 38877)
+++ /branches/rel_apv_10_7/usr/click/lib/libparser/commands.pm	(working copy)
@@ -141,7 +141,7 @@
 		user_level => "CLI_LEVEL_ENABLE",
 		help_string => "Display Prometheus client token data and configuration",
 	},
-	# show prometheus token all
+	# show prometheus token all {forward|backward}
 	{
 		obj_type => "ITEM",
 		name => "all",
@@ -150,9 +150,16 @@
 		user_level => "CLI_LEVEL_ENABLE",
 		help_string => "Display Prometheus client all token",
 		function_name => "prometheus_show_token_all",
-		function_args => [],
+		function_args => [
+			{
+				type => "STRING",
+				help_string => "Display order, forward or backward (default = forward)",
+				optional => "YES",
+				default_value => "\"forward\"",
+			},
+		],
 	},
-	# show prometheus token valid
+	# show prometheus token valid {forward|backward}
 	{
 		obj_type => "ITEM",
 		name => "valid",
@@ -161,9 +168,16 @@
 		user_level => "CLI_LEVEL_ENABLE",
 		help_string => "Display Prometheus client valid token",
 		function_name => "prometheus_show_token_valid",
-		function_args => [],
+		function_args => [
+			{
+				type => "STRING",
+				help_string => "Display order, forward or backward (default = forward)",
+				optional => "YES",
+				default_value => "\"forward\"",
+			},
+		],
 	},
-	# show prometheus token expired
+	# show prometheus token expired {forward|backward}
 	{
 		obj_type => "ITEM",
 		name => "expired",
@@ -172,7 +186,14 @@
 		user_level => "CLI_LEVEL_ENABLE",
 		help_string => "Display Prometheus client expired token",
 		function_name => "prometheus_show_token_expired",
-		function_args => [],
+		function_args => [
+			{
+				type => "STRING",
+				help_string => "Display order, forward or backward (default = forward)",
+				optional => "YES",
+				default_value => "\"forward\"",
+			},
+		],
 	},
 	# prometheus port <port_number>
 	{
@@ -326,10 +347,10 @@
 		function_args => [
 			{
 				type => "U16",
-				help_string => "Prometheus client token ttl (minute)(3-60, default = 5)",
+				help_string => "Prometheus client token ttl (minute)(3-1440, default = 5)",
 				optional => "NO",
 				min => "3",
-				max => "60",
+				max => "1440",
 			},
 		],
 	},
@@ -362,6 +383,17 @@
 			},
 		],
 	},
+	# show prometheus metrics
+	{
+		obj_type => "ITEM",
+		name => "metrics",
+		menu => "root_show_prometheus",
+		cmd_attribute => "CMD_ARRAYOS|CMD_NORMAL|CMD_GLOBAL",
+		user_level => "CLI_LEVEL_ENABLE",
+		help_string => "Display metric names and descriptions provided by Prometheus client.",
+		function_name => "prometheus_show_metrics",
+		function_args => [],
+	},
 # PROMETHEUS CONNAND END
 
 # AZURE COMMAND START
Index: /branches/rel_apv_10_7/usr/click/lib/libprometheus_cli/prometheus_cli.h
===================================================================
--- /branches/rel_apv_10_7/usr/click/lib/libprometheus_cli/prometheus_cli.h	(revision 38877)
+++ /branches/rel_apv_10_7/usr/click/lib/libprometheus_cli/prometheus_cli.h	(working copy)
@@ -56,26 +56,32 @@
 /**
  * @brief Print all token info
  * 
+ * @param order forward or backward
+ * 
  * @details This function is typically triggered by the APV CLI command
- * 			"show prometheus token all" to print all token info.
+ * 			"show prometheus token all {forward|backward}" to print all token info.
  */
-void prometheus_show_token_all();
+void prometheus_show_token_all(char *order);
 
 /**
  * @brief Print valid token info
  * 
+ * @param order forward or backward
+ * 
  * @details This function is typically triggered by the APV CLI command
- * 			"show prometheus token valid" to print valid token info.
+ * 			"show prometheus token valid {forward|backward}" to print valid token info.
  */
-void prometheus_show_token_valid();
+void prometheus_show_token_valid(char *order);
 
 /**
  * @brief Print expired token info
  * 
+ * @param order forward or backward
+ * 
  * @details This function is typically triggered by the APV CLI command
- * 			"show prometheus token expired" to print expired token info.
+ * 			"show prometheus token expired {forward|backward}" to print expired token info.
  */
-void prometheus_show_token_expired();
+void prometheus_show_token_expired(char *order);
 
 /**
  * @brief Set the port number of the Prometheus client service in the configuration file
@@ -172,6 +178,14 @@
 void prometheus_show_log(int lines);
 
 /**
+ * @brief Print metric names and descriptions
+ * 
+ * @details This function is typically triggered by the APV CLI command
+ * 			"show prometheus metrics" to print metric names and descriptions.
+ */
+void prometheus_show_metrics();
+
+/**
  * @brief Write the Prometheus client service configuration to the APV settings
  * 
  * @param segment Unknown, refer to previous code framework
Index: /branches/rel_apv_10_7/usr/click/lib/libprometheus_cli/prometheus_cli.c
===================================================================
--- /branches/rel_apv_10_7/usr/click/lib/libprometheus_cli/prometheus_cli.c	(revision 38877)
+++ /branches/rel_apv_10_7/usr/click/lib/libprometheus_cli/prometheus_cli.c	(working copy)
@@ -72,32 +72,34 @@
 /**
  * @brief Print the token info
  * 
+ * @param order forward or backward
+ * 
  * @param filter all/valid/expired
  */
 void 
-prometheus_show_token(char *filter)
+prometheus_show_token(char *filter, char *order)
 {
 	char cmd[256];
-	snprintf(cmd, 256, "python3 /ca/bin/prometheus_client/update_tokens_table.py show --user %s --filter %s", sess_state.account, filter);
+	snprintf(cmd, 256, "python3 /ca/bin/prometheus_client/update_tokens_table.py show --user %s --filter %s --order %s", sess_state.account, filter, order);
     rum_prometheus_cmd(cmd);
 }
 
 void 
-prometheus_show_token_all()
+prometheus_show_token_all(char *order)
 {
-	prometheus_show_token("all");
+	prometheus_show_token("all", order);
 }
 
 void 
-prometheus_show_token_valid()
+prometheus_show_token_valid(char *order)
 {
-	prometheus_show_token("valid");
+	prometheus_show_token("valid", order);
 }
 
 void 
-prometheus_show_token_expired()
+prometheus_show_token_expired(char *order)
 {
-	prometheus_show_token("expired");
+	prometheus_show_token("expired", order);
 }
 
 void 
@@ -174,6 +176,12 @@
     rum_prometheus_cmd(cmd);
 }
 
+void 
+prometheus_show_metrics()
+{
+	rum_prometheus_cmd("python3 /ca/bin/prometheus_client/prometheus_client_service.py --show_metrics");
+}
+
 char *
 write_prometheus_config(char *segment)
 {
Index: /branches/rel_apv_10_7/usr/click/tools/prometheus_client/prometheus_client_service.py
===================================================================
--- /branches/rel_apv_10_7/usr/click/tools/prometheus_client/prometheus_client_service.py	(revision 38877)
+++ /branches/rel_apv_10_7/usr/click/tools/prometheus_client/prometheus_client_service.py	(working copy)
@@ -9,6 +9,7 @@
 """
 from gevent import monkey; monkey.patch_all()
 
+import argparse
 import psutil
 import ssl
 import threading
@@ -23,36 +24,48 @@
 
 app = Flask(__name__)
 
+metrics_list = []
+
 registry = CollectorRegistry()
+
 cpu_usage = Gauge(
         'cpu_usage', 
         'Current CPU load(%)', 
         ['core'], 
         registry=registry
     )
+metrics_list.append(cpu_usage)
+
 memory_status = Gauge(
         'memory_status', 
         'Represents the current memory usage status of the system, including total, used, available, and usage percentage. Unit in MB', 
         ['status'], 
         registry=registry
     )
+metrics_list.append(memory_status)
+
 disk_status = Gauge(
         'disk_status', 
         'Monitor the disk usage, including total, used, free, and usage percent. Unit in GB', 
         ['status'], 
         registry=registry
     )
+metrics_list.append(disk_status)
+
 network_throughput = Gauge(
         'network_throughput', 
         'Current network throughput (Mb/s) for all network interfaces.', 
         ['interface'], 
         registry=registry
     )
+metrics_list.append(network_throughput)
+
 start_time_seconds = Gauge(
         'start_time_seconds', 
         'Start time of the APV since unix epoch in seconds.', 
         registry=registry
     )
+metrics_list.append(start_time_seconds)
 
 bytes_per_mb = 1024 ** 2
 bytes_per_gb = 1024 ** 3
@@ -122,8 +135,8 @@
     """
     global cpu_usage_result
     while True:
-        cpu_usage_result = psutil.cpu_percent(interval=1, percpu=True)
-        time.sleep(3)
+        cpu_usage_result = psutil.cpu_percent(interval=2, percpu=True)
+        time.sleep(2)
 
 def update_disk_status():
     """
@@ -161,8 +174,9 @@
                     network_throughput.labels(interface=f'{name}_up').set(round(tmp_up, 2))
                     network_throughput.labels(interface=f'{name}_down').set(round(tmp_down, 2))
 
-                    up += tmp_up
-                    down += tmp_down
+                    if 'atcp_veth' in name:
+                        up += tmp_up
+                        down += tmp_down
 
     network_throughput.labels(interface='total_up').set(round(up, 2))
     network_throughput.labels(interface='total_down').set(round(down, 2))
@@ -201,7 +215,17 @@
 
     return generate_latest(registry)
 
-if __name__ == '__main__':
+def show_metrics():
+    """
+    @brief Print metric names and descriptions.
+    """
+    for metric in metrics_list:
+        print(f'{metric._name}: {metric._documentation}')
+
+def run_service():
+    """
+    @brief start web service.
+    """
     update_metrics()
 
     http_server = None
@@ -233,4 +257,14 @@
     cpu_thread.daemon = True
     cpu_thread.start()
 
-    http_server.serve_forever()
\ No newline at end of file
+    http_server.serve_forever()
+
+if __name__ == '__main__':
+    parser = argparse.ArgumentParser()
+    parser.add_argument('--show_metrics', action='store_true', help='Show Prometheus metric names and descriptions')
+    args = parser.parse_args()
+
+    if args.show_metrics:
+        show_metrics()
+    else:
+        run_service()
\ No newline at end of file
Index: /branches/rel_apv_10_7/usr/click/tools/prometheus_client/update_client_config.py
===================================================================
--- /branches/rel_apv_10_7/usr/click/tools/prometheus_client/update_client_config.py	(revision 38877)
+++ /branches/rel_apv_10_7/usr/click/tools/prometheus_client/update_client_config.py	(working copy)
@@ -36,8 +36,8 @@
 KEY_SAVE_PATCH = '/ca/bin/prometheus_client/server.key'
 CRT_SAVE_PATCH = '/ca/bin/prometheus_client/server.crt'
 
-CLIENT_SERVICE = 'python3 /ca/bin/prometheus_client/prometheus_client_service.py &'
-MONITOR_SERVICE = 'python3 /ca/bin/prometheus_client/prometheus_service_monitor.py &'
+CLIENT_SERVICE = 'python3 /ca/bin/prometheus_client/prometheus_client_service.py'
+MONITOR_SERVICE = 'python3 /ca/bin/prometheus_client/prometheus_service_monitor.py'
 
 def main():
     parser = argparse.ArgumentParser()
@@ -136,10 +136,10 @@
     @brief Set the TTL (Time to Live) of the token in the configuration file
     @param token_ttl TTL (Time to Live) of the token
     """
-    if 3 <= token_ttl <= 60:
+    if 3 <= token_ttl <= 1440:
         set_config('token_ttl', token_ttl)
     else:
-        print('The range of token_ttl is 3 to 60 minutes.')
+        print('The range of token_ttl is 3 to 1440 minutes.')
 
 # ==================== status ==================== #
 def get_status():
@@ -212,7 +212,7 @@
     @return port is in use
     """
     for conn in psutil.net_connections(kind='inet'):
-        if conn.laddr.port == port:
+        if conn.laddr.port == port and conn.status not in ('TIME_WAIT', 'CLOSE_WAIT'):
             return True
     return False
 
@@ -232,8 +232,11 @@
             ssl_match_flag = True
 
         if ssl_match_flag:
-            subprocess.Popen(CLIENT_SERVICE.split(), shell=False, stdout=open(os.devnull, 'w'), stderr=open(os.devnull, 'w'))
-            time.sleep(3)
+            for _ in range(3):
+                subprocess.Popen(CLIENT_SERVICE.split(), shell=False, stdout=open(os.devnull, 'w'), stderr=open(os.devnull, 'w'))
+                time.sleep(3)
+                if find_service(CLIENT_SERVICE):
+                    break
             if find_service(CLIENT_SERVICE):
                 open_firewalld_port(get_client_port())
                 if not find_service(MONITOR_SERVICE):
@@ -385,14 +388,18 @@
     else:
         print(f'The content of the private key.\n{key_content}')
         print()
-        print(f'The certificate of the private key.\n{crt_content}')
+        print(f'The content of the certificate.\n{crt_content}')
 
 def del_ssl():
     """
     @brief Delete the private key and certificate
     """
-    set_config('ssl_key_path', '')
-    set_config('ssl_crt_path', '')
+    if get_status():
+        print('The Prometheus client service cannot be changed while it is running.')
+    else:
+        set_config('ssl_key_path', '')
+        set_config('ssl_crt_path', '')
+        set_https_status('off')
 
 def check_ssl_match(ssl_key_path=None, ssl_crt_path=None):
     """
@@ -575,4 +582,4 @@
         print(message)
 
 if __name__ == "__main__":
-    main()
\ No newline at end of file
+    main()
Index: /branches/rel_apv_10_7/usr/click/tools/prometheus_client/update_tokens_table.py
===================================================================
--- /branches/rel_apv_10_7/usr/click/tools/prometheus_client/update_tokens_table.py	(revision 38877)
+++ /branches/rel_apv_10_7/usr/click/tools/prometheus_client/update_tokens_table.py	(working copy)
@@ -26,11 +26,12 @@
     parser.add_argument('--filter', type=str, help='Filters tokens by their status (all|valid|expired)', default='')
     parser.add_argument('--user', type=str, help='User name', default='')
     parser.add_argument('--token', type=str, help='Token', default='')
+    parser.add_argument('--order', type=str, help='Order, forward or backward', default='forward')
 
     args = parser.parse_args()
     try:
         if args.mode == 'show' or args.filter in ['all', 'valid', 'expired']:
-            show_tokens(args.filter)
+            show_tokens(args.filter.strip(), args.order.strip())
         elif args.mode == 'new':
             if len(args.user.strip()) > 0:
                 new_token(args.user.strip())
@@ -60,10 +61,11 @@
 
     return new_token
 
-def print_token_result(query_result):
+def print_token_result(query_result, order=True):
     """
     @brief Print the token query results
     @param query_result Query results
+    @param order True is ascending
     """
     columns = ['Id', 'User', 'Token', 'Created At', 'Expires At', 'Last Used At', 'Is Expired']
     result = []
@@ -82,7 +84,7 @@
     df['Created At'] = pd.to_datetime(df['Created At'], utc=True).dt.tz_convert(timezone_str).dt.strftime('%Y-%m-%d %H:%M:%S')
     df['Expires At'] = pd.to_datetime(df['Expires At'], utc=True).dt.tz_convert(timezone_str).dt.strftime('%Y-%m-%d %H:%M:%S')
     df['Last Used At'] = pd.to_datetime(df['Last Used At'], utc=True).dt.tz_convert(timezone_str).dt.strftime('%Y-%m-%d %H:%M:%S')
-    df = df.sort_values(by='Id')
+    df = df.sort_values(by='Id', ascending=order)
     print(df.to_string(index=False))
 
 def query_one_token_info(token):
@@ -187,11 +189,21 @@
                     return True
     return False
 
-def show_tokens(filter):
+def show_tokens(filter, order):
     """
     @brief Print the token info
     @param filter all/valid/expired
+    @param order forward or backward
     """
+    order_flag = None
+    if order == 'backward'[:len(order)]:
+        order_flag = False
+    elif order == 'forward'[:len(order)]:
+        order_flag = True
+    else:
+        print('Order is forward or backward.')
+        return
+
     update_token_status()
 
     # Connect to the prometheus_token database as the root user
@@ -222,7 +234,7 @@
             cur.execute(query)
             result = cur.fetchall()
 
-            print_token_result(result)
+            print_token_result(result, order_flag)
 
 def new_token(username):
     """
Index: /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/apv/models/prometheus/basic.py
===================================================================
--- /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/apv/models/prometheus/basic.py	(revision 38877)
+++ /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/apv/models/prometheus/basic.py	(working copy)
@@ -10,7 +10,8 @@
         'enable': BooleanField(verbose_name=_('Enable Prometheus'), optional=True),
         'port': PortField(verbose_name=_('Port Number'), default=9100, scope='1025..65000', optional=True),
         'enable_https': BooleanField(verbose_name=_('Enable Https'), optional=True),
-        'ttl': Uint8Field(verbose_name='TTL', scope='3..60', unit_name=_('Minutes'), default=5, optional=True),
+        'ttl': Uint8Field(verbose_name='TTL', scope='3..1440', unit_name=_('Minutes'), default=5, optional=True),
+        'metrics': CharField(verbose_name=_('Metrics'), optional=True, default=""),
     })
     ssl_cert = FieldGroup(writable=False, verbose_name=_('Certificate'), level=ADVANCED, editable=True, fields={
         'private_key': CharField(verbose_name=_('Private Key'), optional=True, default=""),
@@ -60,6 +61,7 @@
                 "port": self._get_port(),
                 "enable_https": self._get_enable_https(),
                 "ttl": self._get_ttl(),
+                "metrics": self._get_metrics(),
             }
             self._model._meta.mark_delay_query(result)
 
@@ -93,6 +95,11 @@
             res_split = cli_res.split(" ") # 5 minute(s)
             return res_split[0]
 
+        def _get_metrics(self):
+            self.cli.set_enable()
+            cli_res = self.cli.cmd('show prometheus metrics')
+            return cli_res
+
         def _update(self, instance):
             data = instance.get_field_dict()
             self.cli.set_config()
