전체 글 60

Python - cmd 명령어 결과 DataFrame 변환

import os import pandas as pd def get_dataframe_text(f) : header = None # df_task_info = pd.DataFrame(columns = ['processid', 'parentprocessid', 'commandline']) flag = True while True : #1. text 데이터 확인 line = f.readline() if not line : break #2. text -> list 변환하여 길이 확인 line = line.split() line_list = list(line) if len(line_list) == 0 : continue if flag == True : flag = False header = pd.Series(l..

윈도우 명령어(cmd.exe)

1. 프로세스 목록 조회 - tasklist.exe /fi "imagename eq py*" - tasklist.exe /v /fi "imagename eq py*" 2. WMIC 명렁어 wmic path Win32_PerfFormattedData_PerfProc_Process 명령어 --> CPU 부하 확인 wmic path Win32_PerfFormattedData_PerfProc_Process where "name like 'py%'" get Name, IDProcess, PercentProcessorTime process 실행 정보 가져오기 wmic process where "name like 'py%'" get processid, parentprocessid, commandline 3. Win3..

#1-3 Windows Tip 2021.08.31