3 echo 3 > /proc/sys/vm/drop_caches 4 top 5 mysql -u root -p 6 cd /var/www 7 ls 8 cd 9 ls 10 netstat -nltp 11 top 12 vi /var/log/httpd/respective-domain-error.log 13 vi /var/log/httpd/error_log 14 top 15 free -m 16 sync; echo 3 > /proc/sys/vm/drop_caches 17 clear 18 df -h 19 /etc/init.d/httpd status 20 ifconfig 21 ll 22 cd 23 ll 24 touch 1 25 ll 26 rm -rf 1 27 ;; 28 ifconfig 29 cd /var/www/html/ 30 ll 31 cd .. 32 ll 33 cd cgi-bin/ 34 ll 35 touch 1 36 ll 37 rm -rf 1 38 ll 39 ifconfig 40 ll 41 cd 42 ll 43 /etc/init.d/mysqld status 44 til -f /var/log/httpd/conferenceseries.com-access_log 45 tsil -f /var/log/httpd/conferenceseries.com-access_log 46 tail -f /var/log/httpd/conferenceseries.com-access_log 47 tail -f /var/log/httpd/conferenceseries.com-error_log 48 vi /var/www/conferenece_com/conferenceseries_com/index.php 49 sar 50 tail -f /var/log/httpd/e 51 tail -f /var/log/httpd/error_log 52 cd /var/www/html/ 53 ll 54 vi index.php 55 mv index.php /opt/ 56 ll 57 ll *php* 58 ll | grep php 59 ls 60 cd /opt/ 61 ll 62 mv index.php /opt/ 63 mv index.php /var/www/html/ 64 ;; 65 l 66 lll 67 ll 68 vi /etc/httpd/conf/httpd.conf 69 cd /var/www/conferenece_com/pcosaa 70 ll 71 vi /etc/httpd/conf/httpd.conf 72 cd /var/www/conferenece_com/conferenceseries_com 73 ;ll 74 ll 75 vi /etc/httpd/conf/httpd.conf 76 httpd -S 77 /etc/init.d/httpd restart 78 vi /etc/httpd/conf/httpd.conf 79 dmesg 80 dmesg | wc 81 dmesg 82 dmesg | wc 83 dmesg | grep -i error 84 cat /var/log/messages | grep -i error 85 vi /var/log/httpd/error_log 86 cat /var/log/httpd/error_log > /tmp/logs.doc 87 vi /tmp/logs.doc 88 httpd -S 89 /etc/init.d/httpd status 90 vi /var/log/httpd/access_log 91 vi /var/log/httpd/error_log 92 /etc/init.d/httpd restart 93 top 94 free -m 95 sync; echo 3 > /proc/sys/vm/drop_caches 96 free -m 97 vi /var/log/messages 98 vi /var/log/httpd/error_log 99 tail -f /var/log/httpd/error_log 100 vi /etc/httpd/conf/httpd.conf 101 cp -a /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf_bkp 102 vi /etc/httpd/conf/httpd.conf 103 crontab -l 104 crontab -e 105 httpd -S 106 free -m 107 top 108 free -m 109 ls 110 vi mem.py 111 ls 112 vi test.sh 113 /etc/init.d/httpd status 114 /etc/init.d/mysqld status 115 netstat -znlp 116 tailf /var/log/httpd/error_log 117 history 118 tailf /var/log/httpd/error_log 119 vi /etc/php.ini 120 httpd -S 121 free -m 122 /etc/init.d/httpd reload 123 /etc/init.d/httpd restart 124 top 125 tail -f /var/log/httpd/access_log 126 tail -f /var/log/httpd/error_log 127 free -m 128 echo 3 > /proc/sys/vm/drop_caches 129 free -m 130 uptime 131 sar -f /var/log/sa/sa2 132 sar f /var/log/sa/sa2 133 sarf /var/log/sa/sa2 134 sar f /var/log/sa/sa2 135 sar -p /var/log/sa/sa2 136 netstat -ntlp 137 ifconfig 138 vi /var/log/httpd/ 139 vi /var/log/httpd/error_log 140 sar 141 sar -r 142 free -m 143 sync; echo 3 > /proc/sys/vm/drop_caches 144 free -m 145 wget http://gnutoolbox.com/download/linux/scripts/mem.py 146 chmod 755 mem.py 147 ./mem.py 148 sar 149 sar -r 150 netstat 151 netstat -planet | wc 152 top 153 lsof -p 2822 154 top 155 lsof -p 814 156 mysql -u root -p 157 cat .mysql_history 158 cat .mysql_history | grep -i passwd 159 mysql -u root -p 160 ifconfig 161 vi /etc/httpd/conf/httpd.conf 162 cd /var/www/html/ 163 ll 164 vi info.php 165 vi test.php 166 rm -rf test.php 167 tail -f /var/log/httpd/access_log 168 netstat 169 top 170 lsof -p 1843 171 free -m 172 /etc/init.d/httpd status 173 ps -ef | grep -i http 174 /etc/init.d/httpd stop 175 ps -ef | grep -i http 176 /etc/init.d/httpd start 177 ps -ef | grep -i http 178 pwd 179 vi test.php 180 /etc/init.d/httpd restart 181 netstat 182 netstat -planet | wc 183 mysql -u root -p 184 ifconfig 185 mysql -u root -p 186 cd conferenceseries/ 187 ;; 188 ll 189 grep conferences_acs * 190 tailf /var/log/mysqld.log 191 vi /var/log/mysqld.log 192 tailf /var/log/mysqld.log 193 date 194 /etc/init.d/mysqld restart 195 tailf /var/log/mysqld.log 196 netstat -planet | wc 197 top 198 df -kh 199 history | grep mysql 200 vi .mysql_history 201 mysql -u root -p 202 w 203 cd 204 cd /var/lib/mysql/ 205 ll 206 cd /var/log/ 207 ll 208 exit 209 ls 210 tail -f /var/log/httpd/error_log 211 vi /var/log/httpd/error_log 212 cat /var/log/httpd/error_log | grep Feb3 213 vi /var/log/httpd/error_log 214 cat /var/log/httpd/error_log | grep Tue Feb 03 215 cat /var/log/httpd/error_log | grep Tue 216 httpd -S 217 httpd -S|wc -l 218 httpd -S 219 httpd -S|wc -l 220 top 221 cat /proc/cpuinfo 222 epad 223 free -m 224 dmidecode |less 225 ls 226 httpd -S 227 vi /etc/httpd/conf/httpd.conf 228 httpd -M 229 httpd -M|grep worker 230 httpd -M|more 231 cd /etc/httpd/conf 232 ls 233 vi httpd.conf 234 /etc/init.d/httpd reload 235 httpd -M|grep worker 236 ls 237 ss 238 netstat -al\ 239 netstat -al 240 netstat -al|grep "TIME_WAIT" 241 netstat -al|grep "TIME_WAIT"|wc -l 242 netstat -alnp|grep "TIME_WAIT"|wc -l 243 cat /root/.mysql_history 244 cat /root/.mysql_history |grep tooy 245 cat /root/.mysql_history |grep root 246 mysql -u root -p 247 tail -f /var/log/httpd/error_log 248 tail -f /var/log/mysqld.log 249 vi /var/log/mysqld.log 250 free -m 251 cd / 252 ls 253 httpd -S 254 ls 255 vi mem.py 256 chmod 775 m 257 chmod 775 mem.py 258 ./mem.py 259 free -m 260 sync ; echo 3 >/proc/sys/vm/drop_caches 261 free -m 262 ./mem.py 263 free -m 264 cat /proc/meminfo 265 free -m 266 cat /proc/meminfo 267 httpd -S 268 httpd -S|grep omics 269 cd /var/log/ 270 ls 271 cd httpd/ 272 ls 273 tail -f /var/log/mysqld.log 274 ls 275 vi healtheconomics.global-summit.com-error_log 276 tail -f healtheconomics.global-summit.com-error_log 277 tail -f healtheconomics.global-summit.com-access_log 278 httpd -S|grep omics 279 tail -f /var/log/mysqld.log 280 httpd -S|grep omics 281 ld 282 httpd -S 283 httpd -S 284 httpd -S|grep omics 285 l 286 netstat -nlap|grep "TIME_WAIT" 287 netstat -nlap|grep "TIME_WAIT"|wc -l 288 ls 289 l 290 tail -f /var/log/err 291 tail -f /var/log/httpd/error_log 292 exit 293 /etc/init.d/mysqld status 294 /etc/init.d/httpd status 295 ffeww -m 296 free -m 297 echo 3 > /proc/sys/vm/drop_caches 298 free -m 299 /etc/init.d/httpd status 300 /etc/init.d/httpd status 301 history 302 tail -f /var/log/httpd/error_log 303 tail -f /var/log/mysqld.log 304 history | grep mysql 305 vi mysqlrestart.sh 306 crontab -l 307 ps -ef | grep mysql 308 mysql -u root 309 vi /etc/httpd/conf/httpd.conf 310 vi logs/nanotechnology.omicsgroup.com-error_log 311 vi /var/logs/nanotechnology.omicsgroup.com-error_log 312 vi /var/log/httpd/error_log 313 cat /var/log/httpd/error_log | grep Wed Feb 04 314 cat /var/log/httpd/error_log | grep Wed 315 cat /var/log/httpd/error_log | grep Wed 316 cat /var/log/httpd/error_log 317 cat /var/log/httpd/error_log | grep Wed Feb 04 318 cat /var/log/httpd/error_log | grep Wed 319 cat /var/log/httpd/error_log | grep [Wed Feb 04] 320 cat /var/log/httpd/error_log | grep Wed 321 df -h 322 dmidecode | more 323 df -h 324 netstat -lnp 325 df -h 326 vi /var/log/mysqld.log 327 iptables -L 328 ifconfig -a 329 vi /var/log/mysqld.log 330 df -h 331 ps -ef | grep http 332 ps -ef | grep apache | wc -l 333 /usr/sbin/httpd -S 334 /usr/sbin/httpd -S | more 335 336 vi /etc/httpd/conf/httpd.conf 337 /usr/sbin/httpd -M 338 /usr/sbin/httpd -M | grep wor 339 /usr/sbin/httpd -M | grep -i Wor 340 /usr/sbin/httpd -V 341 vi /etc/httpd/conf/httpd.conf 342 ps -ef | grep apache | wc -l 343 vi /etc/httpd/conf/httpd.conf 344 /etc/init.d/httpd reload 345 ps -ef | grep apache | wc -l 346 vi /etc/httpd/conf/httpd.conf 347 cd /var/log/httpd/ 348 cd 349 cat /etc/issue 350 ll 351 cd /var/www/html/ 352 ll 353 cd 354 ps -ef |grep - apache 355 ps -ef |grep -i apache 356 ps -ef |grep -c apache 357 yum install webalizer awstats perl-DateTime-Format-HTTP perl-DateTime-Format-Builder 358 vi /var/log/mysqld.log 359 du -sh /var/log/mysqld.log 360 cp -rvp /var/log/mysqld.log /opt/ 361 cd /var/log/httpd/ 362 ll 363 ll |wc -l 364 L 365 ls 366 ps -ef|grep httpd 367 ps -ef|grep httpd|wc -l 368 httpd -M|grep mpm 369 ls 370 netstat -nlap|grep "TIME" 371 netstat -nlap|grep "TIME"|wc -l 372 netstat -nlap|wc -l 373 netstat -nlap 374 tail -f /var/log/mysqld.log 375 vi /var/log/mysqld.log 376 cd /var/www/html/ 377 ls 378 cd ophthalmology 379 ls 380 vi index.php 381 cd foodtechnology2014 382 cd .. 383 ls 384 cat /root/.mysql_history 385 cat /root/.mysql_history |more 386 mysql -u root -p 387 cd /var/lib/mysql/ 388 ls 389 du -sh ib* 390 mysql -u root -p 391 du -sh /var/lib/mysql/ 392 du -sh /var/lib/mysql 393 cd /var/lib/mysql 394 ls 395 du -sh * 396 ps -ef|grep mysql 397 du -sh /var/lib/mysql 398 du -sh /var/www/html/ 399 free -m 400 exit 401 logout 402 free -m 403 sync ; echo 3 >/proc/sys/vm/drop_caches 404 locate nrpe.cfg 405 cat /usr/local/nagios/etc/nrpe.cfg 406 /usr/local/nagios/libexec/check_mem -w 90,20 -c 95,50 407 ls 408 netstat -tlnp 409 vi /etc/sysctl.conf 410 sysctl -p 411 /etc/init.d/httpd status 412 vi /etc/httpd/conf/httpd.conf 413 cp -a /etc/httpd/conf/httpd.conf /opt/ 414 ls 415 cd /opt/ 416 ls 417 vi httpd.conf 418 cd - 419 ls 420 vi /etc/httpd/conf/httpd.conf 421 httpd -s 422 httpd -t 423 /etc/init.d/httpd reload 424 /etc/init.d/httpd restart 425 curl --header "Accept-Encoding: gzip,deflate,sdch" -I micsgroup.net 426 curl --header "Accept-Encoding: gzip,deflate,sdch" -I omicsgroup.net 427 w 428 httpd -l 429 cd /var/www/ 430 ll 431 vi /etc/httpd/conf/httpd.conf 432 history 433 curl --header "Accept-Encoding: gzip,deflate,sdch" -I omicsgroup.net 434 vi /etc/httpd/conf/httpd.conf 435 cd /opt/ 436 ls 437 cd /etc/httpd/conf 438 cp -a /opt/httpd.conf . 439 vi httpd.conf 440 /etc/init.d/httpd restart 441 vi httpd.conf 442 /etc/init.d/httpd restart 443 ifconfig 444 vi /etc/httpd/conf/httpd.conf 445 /etc/init.d/httpd restat 446 /etc/init.d/httpd restart 447 vi /etc/httpd/conf/httpd.conf 448 /etc/init.d/httpd restart 449 netstat -anp | grep :80 450 netstat -anp | grep :80 | less 451 ps -ef | grep -i 8411 452 httpd -S 453 vi /etc/httpd/conf/httpd.conf 454 w 455 ll 456 ifconfig 457 vi /etc/httpd/conf/httpd.conf 458 /etc/init.d/httpd restart 459 vi /etc/httpd/conf/httpd.conf 460 /etc/init.d/httpd reload 461 httpd -S 462 httpd -S|wc -l 463 vi +2987 /etc/httpd/conf/httpd.conf 464 exit 465 logout 466 df -kh 467 free -m 468 sync ; echo 3 >/proc/sys/vm/drop_caches 469 free -m 470 df -i 471 vi /etc/httpd/conf/httpd.conf 472 /etc/init.d/httpd reload 473 netstat -ntlp 474 netstat -nalp 475 netstat -nalp|less 476 /etc/init.d/httpd restart 477 /etc/init.d/mysqld restart 478 top 479 /etc/init.d/httpd status 480 /etc/init.d/mysql status 481 /etc/init.d/mysqld status 482 netstat -ntlp 483 tailf /var/log/httpd/ 484 tailf /var/log/httpd/error_log 485 vi /etc/httpd/conf/httpd.conf 486 tailf /var/log/httpd/error_log 487 vi /etc/httpd/conf/httpd.conf 488 cd /etc/httpd/conf/ 489 cp httpd.conf /etc/httpd.conf_9febbkp 490 cd /etc/httpd.conf_9febbkp 491 cd /etc/ 492 ls 493 cd /etc/httpd.conf_9febbkp 494 cd 495 cp httpd.conf /opt/httpd.conf_feb9_bkp 496 cd /etc/httpd/conf/ 497 cp httpd.conf /opt/httpd.conf_feb9_bkp 498 vi httpd.conf 499 /etc/init.d/httpd restart 500 tailf /var/log/httpd/error_log 501 /etc/init.d/mysqld status 502 netstat 503 netstat -planet 504 netstat -planet | wc 505 vi /etc/httpd/conf/httpd.conf 506 /etc/init.d/httpd restart 507 vi /etc/httpd/conf/httpd.conf 508 netstat 509 tail -f /var/log/httpd/omicsgroup.com-error_log 510 cat /var/log/httpd/omicsgroup.com-error_log 511 df -kh 512 free -m 513 sync ; echo 3 >/proc/sys/vm/drop_caches 514 free -m 515 cd 516 cd /opt/ 517 mv httpd.conf_feb9_bkp /etc/httpd/conf/httpd.conf 518 cp httpd.conf_feb9_bkp /etc/httpd/conf/httpd.conf 519 cd 520 vi /etc/httpd/conf/httpd.conf 521 /etc/init.d/httpd restart 522 free -m 523 sync ; echo 3 >/proc/sys/vm/drop_caches 524 free -m 525 httpd -S 526 httpd -S | grep confe 527 sync ; echo 3 >/proc/sys/vm/drop_caches 528 free -m 529 sync ; echo 3 >/proc/sys/vm/drop_caches 530 /etc/init.d/httpd status 531 /etc/init.d/mysqld status 532 sync ; echo 3 >/proc/sys/vm/drop_caches 533 free -m 534 sync ; echo 3 >/proc/sys/vm/drop_caches 535 free -m 536 sync ; echo 3 >/proc/sys/vm/drop_caches 537 free -m 538 /etc/init.d/httpd restart 539 free -m 540 sync ; echo 3 >/proc/sys/vm/drop_caches 541 free -m 542 vi /etc/httpd/conf/httpd.conf 543 /etc/init.d/httpd restart 544 /etc/init.d/httpd status 545 vi /etc/httpd/conf/httpd.conf 546 netstat -ntlp 547 vi /etc/httpd/conf/httpd.conf 548 cd /var/www/ 549 ls 550 cd textile.ctextile.c 551 cd textile.conferenceseries.com 552 free -m 553 sync ; echo 3 >/proc/sys/vm/drop_caches 554 free -m 555 sync ; echo 3 >/proc/sys/vm/drop_caches 556 free -m 557 /etc/init.d/httpd status 558 top 559 cd /var/log/httpd/ 560 ls 561 tail -f omicsgroup.com-error_log 562 httpd -S|grep "omicsgroup.com" 563 httpd -S|grep -R "omicsgroup.com" 564 free -m 565 netstat -nlap|grep "TIME_WAIT" 566 netstat -nlap|grep "TIME_WAIT"|wc -l\ 567 netstat -nlap|grep "TIME_WAIT"|wc -l 568 httpd -S 569 httpd -S|grep -R "omicsgroup.com" 570 vi +4196 /etc/httpd/conf/httpd.conf 571 tail -f breastcancer.omicsgroup.com-error_log 572 cat /root/.mysql_history |grep root 573 mysql -u root -p ctrls.123 574 mysql -u root -pctrls.123 575 /etc/init.d/mysqld restaRT 576 /etc/init.d/mysqld restart 577 mysql -u root -pctrls.123 578 /etc/init.d/httpd restart 579 tail -f breastcancer.omicsgroup.com-error_log 580 ls 581 /etc/init.d/httpd status 582 tail -f /var/log/messages 583 top 584 ls 585 netstat -tnlp 586 netstat -anlp 587 netstat -anlp | grep httpd 588 /etc/init.d/httpd restart 589 ps aufx 590 ls 591 top 592 mysqldump -u root -p --all-databases >/opt/all-db-10-02-2015.sql 593 cat /root/.mysql_history |grep root 594 mysqldump -u root -p --all-databases >/opt/all-db-10-02-2015.sql 595 du -sh /opt/all-db-10-02-2015.sql 596 rm -rf /opt/all-db-10-02-2015.sql 597 mysqldump -u root -p --events --all-databases >/opt/all-db-10-02-2015.sql 598 du -sh /opt/all-db-10-02-2015.sql 599 exit 600 free -m 601 top 602 httpd service restart 603 service httpd restart 604 top 605 history 606 free -m 607 mysql -u root -p 608 free -m 609 cd /etc/inet.d 610 cd / 611 who am i 612 cd / 613 ls 614 cd etc/init.d 615 ls 616 mysqld status 617 free -m 618 service httpd restart 619 srvice mysqld restart 620 service mysqld restart 621 free -m 622 mysql - u root -p 623 mysql - u root -p ctrls.d 624 mysql - u root -p 625 mysql -u root -p 626 free -m 627 top 628 free -m 629 top 630 history 631 free -m 632 help 633 service mysqld restart 634 service httpd restart 635 free -m 636 /etc/init.d/httpd restart 637 netstat 638 netstat -planet | wc 639 netstat -planet 640 netstat -planet | wc 641 netstat -planet 642 free -m 643 netstat -planet 644 /etc/init.d/httpd restart 645 netstat -planet 646 netstat -planet | wc 647 netstat -planet 648 /etc/init.d/httpd restart 649 netstat -planet 650 netstat -planet | wc 651 netstat -planet 652 netstat -planet | wc 653 free -m 654 sync ; echo 3 >/proc/sys/vm/drop_caches 655 sync ; echo 3 >/proc/sys/vm/drop_caches 656 free -m 657 sync ; echo 3 >/proc/sys/vm/drop_caches 658 crontab -e 659 which sync ; echo 3 >/proc/sys/vm/drop_caches 660 sync ; echo 3 >/proc/sys/vm/drop_caches 661 free -m 662 sync ; echo 3 >/proc/sys/vm/drop_caches 663 free -m 664 sync ; echo 3 >/proc/sys/vm/drop_caches 665 free -m 666 sync ; echo 3 >/proc/sys/vm/drop_caches 667 free -m 668 sync ; echo 3 >/proc/sys/vm/drop_caches 669 free -m 670 sync ; echo 3 >/proc/sys/vm/drop_caches 671 free -m 672 sync ; echo 3 >/proc/sys/vm/drop_caches 673 free -m 674 sync ; echo 3 >/proc/sys/vm/drop_caches 675 /etc/init.d/httpd restart 676 sync ; echo 3 >/proc/sys/vm/drop_caches 677 free -m 678 sync ; echo 3 >/proc/sys/vm/drop_caches 679 free -m 680 sync ; echo 3 >/proc/sys/vm/drop_caches 681 free -m 682 vi /etc/httpd/conf/httpd.conf 683 cat /etc/resolv.conf 684 /etc/init.d/httpd status 685 top 686 free -m 687 sync ; echo 3 >/proc/sys/vm/drop_caches 688 free -m 689 top 690 vi /etc/httpd/conf/httpd.conf 691 ps -ef 692 free -m 693 mysql 694 mysql -u root -p 695 vi /etc/httpd/conf/httpd.conf 696 cd /var/www/conferenece_com/conferenceseries_com 697 ll 698 vi db.php 699 :q 700 ifconfig 701 mysql -u root -p 702 cd 703 netstat -ntpl 704 netstat -napl 705 netstat -napl |grep -c http 706 w 707 cd 708 vi /etc/httpd/conf/httpd.conf 709 cd /var/www/conferenece_com/conferenceseries_com 710 ls 711 cd ../ 712 cd 713 vi /etc/httpd/conf/httpd.conf 714 top 715 top -cd2 716 history 717 ./mem.py 718 pwd 719 ll 720 cat mem.py 721 ./mem.py 722 ll 723 cat mem.py 724 # have the undesirable affect of splitting up programs started with 725 # differing parameters (for e.g. mingetty tty[1-6]). 726 # 727 # For 2.6 kernels up to and including 2.6.13 and later 2.4 redhat kernels 728 # (rmap vm without smaps) it can not be accurately determined how many pages 729 # are shared between processes in general or within a program in our case: 730 # http://lkml.org/lkml/2005/7/6/250 731 # A warning is printed if overestimation is possible. 732 # In addition for 2.6 kernels up to 2.6.9 inclusive, the shared 733 # value in /proc/$pid/statm is the total file-backed extent of a process. 734 # We ignore that, introducing more overestimation, again printing a warning. 735 # Since kernel 2.6.23-rc8-mm1 PSS is available in smaps, which allows 736 # us to calculate a more accurate value for the total RAM used by programs. 737 # 738 # Programs that use CLONE_VM without CLONE_THREAD are discounted by assuming 739 # they're the only programs that have the same /proc/$PID/smaps file for 740 # each instance. This will fail if there are multiple real instances of a 741 # program that then use CLONE_VM without CLONE_THREAD, or if a clone changes 742 # its memory map while we're checksumming each /proc/$PID/smaps. 743 # 744 # I don't take account of memory allocated for a program 745 # by other programs. For e.g. memory used in the X server for 746 # a program could be determined, but is not. 747 import sys, os, string 748 try: 749 # md5 module is deprecated on python 2.6 750 # so try the newer hashlib first 751 import hashlib 752 md5_new = hashlib.md5 753 except ImportError: 754 import md5 755 md5_new = md5.new 756 if os.geteuid() != 0: 757 sys.stderr.write("Sorry, root permission required.\n"); 758 sys.exit(1) 759 split_args=False 760 if len(sys.argv)==2 and sys.argv[1] == "--split-args": 761 split_args = True 762 PAGESIZE=os.sysconf("SC_PAGE_SIZE")/1024 #KiB 763 our_pid=os.getpid() 764 #(major,minor,release) 765 def kernel_ver(): 766 kv=open("/proc/sys/kernel/osrelease", "rt").readline().split(".")[:3] 767 for char in "-_":; kv[2]=kv[2].split(char)[0] 768 return (int(kv[0]), int(kv[1]), int(kv[2])) 769 kv=kernel_ver() 770 have_pss=0 771 #return Private,Shared 772 #Note shared is always a subset of rss (trs is not always) 773 def getMemStats(pid): 774 global have_pss 775 mem_id = pid #unique 776 Private_lines=[] 777 Shared_lines=[] 778 Pss_lines=[] 779 Rss=int(open("/proc/"+str(pid)+"/statm", "rt").readline().split()[1])*PAGESIZE 780 if os.path.exists("/proc/"+str(pid)+"/smaps"): #stat 781 digester = md5_new() 782 for line in open("/proc/"+str(pid)+"/smaps", "rb").readlines(): #open 783 # Note we checksum smaps as maps is usually but 784 # not always different for separate processes. 785 digester.update(line) 786 line = line.decode("ascii") 787 if line.startswith("Shared"): 788 Shared_lines.append(line) 789 elif line.startswith("Private"): 790 Private_lines.append(line) 791 elif line.startswith("Pss"): 792 have_pss=1 793 Pss_lines.append(line) 794 mem_id = digester.hexdigest() 795 Shared=sum([int(line.split()[1]) for line in Shared_lines]) 796 Private=sum([int(line.split()[1]) for line in Private_lines]) 797 #Note Shared + Private = Rss above 798 #The Rss in smaps includes video card mem etc. 799 if have_pss:; pss_adjust=0.5 #add 0.5KiB as this average error due to trunctation; Pss=sum([float(line.split()[1])+pss_adjust for line in Pss_lines]) 800 Shared = Pss - Private 801 elif (2,6,1) <= kv <= (2,6,9): 802 Shared=0 #lots of overestimation, but what can we do? 803 Private = Rss 804 else: 805 Shared=int(open("/proc/"+str(pid)+"/statm", "rt").readline().split()[2]) 806 Shared*=PAGESIZE 807 Private = Rss - Shared 808 return (Private, Shared, mem_id) 809 def getCmdName(pid): 810 cmdline = open("/proc/%d/cmdline" % pid, "rt").read().split("\0") 811 if cmdline[-1] == '' and len(cmdline) > 1: 812 cmdline = cmdline[:-1] 813 path = os.path.realpath("/proc/%d/exe" % pid) #exception for kernel threads 814 if split_args:; return " ".join(cmdline) 815 if path.endswith(" (deleted)"): 816 path = path[:-10] 817 if os.path.exists(path): 818 path += " [updated]" 819 else: 820 #The path could be have prelink stuff so try cmdline 821 #which might have the full path present. This helped for: 822 #/usr/libexec/notification-area-applet.#prelink#.fX7LCT (deleted) 823 if os.path.exists(cmdline[0]): 824 path = cmdline[0] + " [updated]" 825 else: 826 path += " [deleted]" 827 exe = os.path.basename(path) 828 cmd = open("/proc/%d/status" % pid, "rt").readline()[6:-1] 829 if exe.startswith(cmd): 830 cmd=exe #show non truncated version 831 #Note because we show the non truncated name 832 #one can have separated programs as follows: 833 #584.0 KiB + 1.0 MiB = 1.6 MiB mozilla-thunder (exe -> bash) 834 # 56.0 MiB + 22.2 MiB = 78.2 MiB mozilla-thunderbird-bin 835 return cmd 836 cmds={} 837 shareds={} 838 mem_ids={} 839 count={} 840 for pid in os.listdir("/proc/"): 841 if not pid.isdigit(): 842 continue 843 pid = int(pid) 844 if pid == our_pid:; continue; try:; cmd = getCmdName(pid) 845 except: 846 #permission denied or 847 #kernel threads don't have exe links or 848 #process gone 849 continue 850 try: 851 private, shared, mem_id = getMemStats(pid) 852 except: 853 continue #process gone 854 if shareds.get(cmd): 855 if have_pss: #add shared portion of PSS together; shareds[cmd]+=shared; shareds[cmd]=shared; else:; shareds[cmd]=shared; cmds[cmd]=cmds.setdefault(cmd,0)+private 856 if cmd in count:; count[cmd] += 1; else:; count[cmd] = 1; mem_ids.setdefault(cmd,{}).update({mem_id:None}) 857 #Add shared mem for each program 858 total=0 859 for cmd in cmds:; cmd_count = count[cmd] 860 if len(mem_ids[cmd]) == 1 and cmd_count > 1: 861 # Assume this program is using CLONE_VM without CLONE_THREAD 862 # so only account for one of the p 863 cmds[cmd] /= cmd_count 864 if have_pss:; shareds[cmd] /= cmd_count; cmds[c; total+=cmds[cmd] #valid if PSS available; ; if sys.version_info >= (2, 6):; sort_list = sorted(; else:; sort_list = cm; sort_list.sort(lambda x,y:cmp(x[1],y[1])); sort_list=list(filter(lambda x:x[1],sort_list)) #get rid of zero sized processes; ; def human(num, power="Ki"):; powers=["Ki","Mi","Gi","Ti"]; while num >= 1000: #4 digits; num /= 1024.0; power=powers[powers.index(power)+1]; return "%.1f %s" % (num,power); ; def cmd_wit; if count>1:; return "%s (%u)" % (cmd, count); else:; return cmd; ; sys.stdout.write(" Private + Shared = RAM used\tProgram \n\n"); for cmd in sort_list:; sys.stdout.write("%8sB + %8sB = %8sB\t%s\n" % (human(cmd[1]-shareds[cmd[0]]),; human(shareds[cmd[0]]), human(cmd[1]),; ; if have_pss:; sys.stdout.write("%s\n%s%8sB\n%s\n" % ("-" * 33,; " " * 24, human(total), "=" * 33)); sys.stdout.write("\n Private + Shared = RAM used\tProgram \n\n"); ; def shared_val_accuracy():; """http://wiki.apache.org/spamassassin/TopSharedMemoryBug"; if kv[:2] == (2,4):; if open("/proc/meminfo", "rt").read().find("Inact_") == -1:; return 1; ; elif ; if os.path.exists("/proc/"+str(os.getpid())+"/smaps"):; if op; return 2; else:; ; if (2,6,1) <= kv <= (2,6,9):; return -1; return 0; else:; return 1; ; vm_accuracy = shared_val; if vm_accuracy == -1:; sys.stderr.write(; ; ); sys.stderr.write(; ; ); elif vm_accuracy == 0:; sys.stderr.write(; "Warning: Shared memory is not reported accurately by this system.\n"; ); sys.stderr.write(; "Values 865 ) 866 elif vm_accuracy == 867 sys.stderr.write( 868 "Warning: Shared memory is slightly over-estimated b; "for each program, so totals are not reported.\n"; ); 869 cat mem.py | less 870 cp mem.py /var/www/html/ 871 IFC 872 ifconfig 873 cd /var/www/html/ 874 ll 875 ifconfig 876 cat mem.py 877 pwd 878 rm -rf mem.py 879 ll 880 cd 881 /etc/init.d/httpd reload 882 cd /var/log/httpd/ 883 ll 884 ll textile.conferenceseries.com- 885 ll textile.conferenceseries.com-error_log 886 ls 887 vi /etc/httpd/conf/httpd.conf 888 /etc/init.d/httpd restart 889 vi /etc/httpd/conf/httpd.conf 890 netstat -tnlpo 891 netstat -tnlp 892 tail -f /var/log/httpd/omicsgroup.com-error_log 893 df -kh 894 dmesg 895 netstat -anlp 896 netstat -anlp | grep -i 80 897 netstat -anlp | grep -i 80 | wc -l 898 /etc/init.d/httpd restart 899 ls 900 netstat -anlp 901 ps -ef | less 902 ls 903 netstat -anlp | grep -i 80 | wc -l 904 netstat -anlp 905 netstat -anlp | grep -i TIME_WAIT 906 netstat -anlp | grep -i TIME_WAIT | wc -l 907 top 908 free -m 909 ls 910 httpd -S 911 lsls 912 cd /var/log/httpd/ 913 ls 914 tail -f transcriptomics.conferenceseries.com-error_log 915 ifconfig 916 tail -f transcriptomics.conferenceseries.com-error_log 917 ifconfig 918 ls 919 netstat -anlp | grep -i TIME_WAIT | wc -l 920 netstat -anlp 921 netstat -anlp | grep -i 80 922 netstat -anlp | grep -i 80 | wc -l 923 history 924 vi /etc/httpd/conf/httpd.conf 925 /etc/init.d/httpd restart 926 vi /var/log/httpd/error_log 927 cat /var/log/httpd/error_log | grep Feb 08 928 cat /var/log/httpd/error_log | grep "Feb 08" 929 cat /var/log/httpd/error_log | grep "Feb 11" 930 cat /var/log/httpd/error_log | grep "Feb 11" |less 931 vi /var/log/httpd/error_log 932 vi /var/log/httpd/access_log | grep "Feb 11" 933 cd /var/www/ 934 ls 935 cd html 936 cd conferenceseries/ 937 ls 938 cd .. 939 cd conferenece_com/ 940 ls 941 vi /etc/httpd/conf/httpd.conf 942 /etc/init.d/httpd restart 943 cd /var/www/conferenece_com/ 944 ll 945 /etc/init.d/httpd restart 946 locate plantbiology 947 history |less 948 history |grep -i plantbiology 949 cd /var/www/html/ 950 ll 951 cd ../ 952 ll 953 cd conferenece_com/ 954 ll 955 cd /var/log/httpd/ 956 ls 957 ll 958 cd /var/log/httpd/ 959 ls 960 pwd 961 vi /etc/httpd/conf/httpd.conf 962 cd /var/www/global-summit_com/weightloss/ 963 ll 964 php header.php 965 vi /etc/httpd/conf/httpd.conf 966 cd /var/www/global-summit_com/cancer 967 ll 968 vi index.php 969 cd ../weightloss/ 970 ll 971 cd asia-pacific/ 972 ll 973 cd ../ 974 ll 975 history |grep -i weightloss 976 vi /etc/httpd/conf/httpd.conf 977 /etc/init.d/httpd restart 978 vi /etc/httpd/conf/httpd.conf 979 cd /var/www/global-summit_com/ 980 ls 981 cd weightloss/ 982 ls 983 ll 984 vi /etc/httpd/conf/httpd.conf 985 vi /var/log/httpd/weightloss.global-summit.com-error_log 986 ls 987 cd asia-pacific/ 988 ls 989 vi /etc/httpd/conf/httpd.conf 990 /etc/init.d/httpd restart 991 yum install mysql-server 992 yum remove mysql-server 993 vi /etc/httpd/conf/httpd.conf 994 cd /var/www/conferenece_com/plantbiology 995 ls 996 cd /var/www/conferenece_com 997 ls 998 cd plantbiology 999 history 1000 service mysqld status 1001 service mysqld restart 1002 history > /var/www/omicsgroup_com/omicsgroup_mainsite/history.txt