parameters: ()
return_statement: return "404", 404
docstring: Endpoint to get information regarding cpu
          Returns:
              json object of information containing percentage usage, number of cpus, percentage usage per cpu
docstring_summary: Endpoint to get information regarding cpu
          Returns:
              json object of information containing percentage usage, number of cpus, percentage usage per cpu
docstring_tokens: Endpoint to get information regarding cpu Returns : json object of information containing percentage usage number of cpus percentage usage per cpu
function: def get_cpu():
      """Endpoint to get information regarding cpu
          Returns:
              json object of information containing percentage usage, number of cpus, percentage usage per cpu
      """
      if not check_auth(request):
          return "404", 404
      try:
          percent = psutil.cpu_percent()
          count = psutil.cpu_count()
          percpu = psutil.cpu_percent(interval=1, percpu=True)
          data = {
              "percentage": percent,
              "count": count,
              "per_cpu": percpu
          }
          return jsonify(data), 200
      except Exception as e:
          print(e)
      return "404", 404
function_tokens: def get_cpu ( ) : if not check_auth ( request ) : return "404" , 404 try : percent = psutil . cpu_percent ( ) count = psutil . cpu_count ( ) percpu = psutil . cpu_percent ( interval = 1 , percpu = True ) data = { "percentage" : percent , "count" : count , "per_cpu" : percpu } return jsonify ( data ) , 200 except Exception as e : print ( e ) return "404" , 404