Skip to content

Instantly share code, notes, and snippets.

@AhnSeongHyun
Created May 29, 2012 03:18
Show Gist options
  • Save AhnSeongHyun/2822335 to your computer and use it in GitHub Desktop.
Save AhnSeongHyun/2822335 to your computer and use it in GitHub Desktop.
[PYTHON] use code
server_name = socket.gethostname();
if pstack_count == 1:
for file in pstack_list:
mail("sh84.ahn@gmail.com",server_name + "::pstack log", file, "./"+file);
print "["+file+"]"+" send to sh84.ahn@gmail.com \n";
os.remove("./"+file);
elif pstack_count > 1:
zip_file_name = "pstack_logs.zip";
toZip(pstack_list, zip_file_name);
#for file in pstack_list:
#os.remove("./"+file);
mail("sh84.ahn@gmail.com",server_name + "::pstack log", zip_file_name, "./"+zip_file_name);
print "["+zip_file_name+"]"+" send to sh84.ahn@gmail.com \n";
os.remove("./"+zip_file_name);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment