1600, 1/80 ȸ¿ø°¡ÀÔ  ·Î±×ÀΠ 
   rootguy
   http://f-world.co.kr
   ÀÚ¹Ù°¡»ó¸Ó½Å JVM ¸Þ¸ð¸® Á¶Á¤Çϱâ

http://www.hackerschool.org/HS_Boards/zboard.php?id=Free_Lectures&no=580 [º¹»ç]


outofmemory´Â »ý¼ºµÇ´Â °´Ã¼¸¦ À§ÇØ ´õ ÀÌ»ó ÇÒ´çÇØÁÙ ¸Þ¸ð¸® °ø°£ÀÌ ¾ø´Ù´Â ÀǹÌÀε¥...
java¿¡¼­ memory¸¦ ÇÒ´çÇØÁÖ´Â ³ðÀº tomcatÀ» ½ÇÇà½ÃŲ jvmÀÌÁÒ.

±×·¯¸é jvm¿¡ º¸´Ù ¸¹Àº ¸Þ¸ð¸®¸¦ Á¦°øÇÏ¸é ¹®Á¦°¡ ÇØ°áµÈ´Ù°í »ý°¢Çß¾ú½À´Ï´Ù.

jvmÀÇ ¸Þ¸ð¸® °ü¸®¿¡ °³¹ßÀÚ°¡ ¿µÇâÀ» ¹ÌÄ¥ ¼ö ÀÖ´Â °¡Àå ½¬¿î ¹æ¹ýÀº java°¡ ½ÇÇàµÉ ¶§ Xms XmxµîÀÇ ¸Þ¸ð¸® °ü·Ã ¿É¼ÇÀ» »ç¿ëÇÏ´Â °ÍÀÔ´Ï´Ù.

<´ÙÀ½Àº sun jvmÀÇ °æ¿ìÀÔ´Ï´Ù.>
¾Æ¸¶.. ¾Æ¹«·± ¿É¼ÇÀ» ÁÖÁö ¾ÊÀ¸¸é µðÆúÆ®·Î °¡¿ëÇÑ ¸Þ¸ð¸® Å©±â°¡ 128MÀΰ¡·Î ¼³Á¤ÀÌ µÇ´Âµ¥¿ä..
±×·¡¼­ ¿¹¸¦ µé¸é tomcatÀÇ catalina.sh¿¡ ´ÙÀ½°ú °°Àº °ªÀ¸·Î optionÀ» Á¶Á¤ÇÏ¿´½À´Ï´Ù.
JAVA_OPTS="-Xms512m -Xmx512m -XX:PermSize=64m -XX:MaxPermSize=64m -XX:NewSize=400m -XX:MaxNewSize=400m -XX:SurvivorRatio=4 -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintHeapAtGC"

Xms, Xmx, permsize, newsize survivorRatioµîÀÇ ¿É¼ÇÀ» ÀûÀýÈ÷ »ç¿ëÇÏ¸é ¾Æ¸¶ outofmemory ¹®Á¦¸¦ ÇØ°áÇÒ ¼ö ÀÖÀ» °ÍÀÔ´Ï´Ù. À§ÀÇ ¼ýÀÚ¼³Á¤¿¡ ´ëÇÑ °¡À̵å´Â javaservice.netÀ̳ª À¥¿¡¼­ outofmemeory·Î °Ë»öÇغ¸½Ã¸é ÁÁÀº ¾ÆƼŬÀÌ ¸¹½À´Ï´Ù.

±×¸®°í À§ÀÇ ¿¹Á¦ Äڵ尡 ¹«»çÈ÷ ½ÇÇàÀ» ¸¶Ä¡°í ½ÇÇེÅÿ¡¼­ ºüÁø ÈÄ¿¡ GC°¡ ¹ß»ýÇÏ¸é ¸Þ¸ð¸®°¡ ÁÙ¾îµé °Í °°³×¿ä.



¢Â ÅèĹ Èü ¸Þ¸ð¸® Á¶Á¤Çϱâ (À©µµ¿ì¿ë)
1. ( ÅèĹ ½ÇÇà ÆÄÀÏ catalina.bat ¼öÁ¤ ) catalina.bat ÆÄÀÏ ³»¿¡ ÇØ´ç ³»¿ëÀ» ÀÔ·ÂÇÑ´Ù.
set JAVA_OPTS=-server -Xms128m -Xmx128m

½ÃÀÛ > ½ÇÇà > cmd (µµ½ºÃ¢µé¾î°£ÈÄ) > catalina.bat stop ½ÇÇà
½ÃÀÛ > ½ÇÇà > cmd (µµ½ºÃ¢µé¾î°£ÈÄ) > catalina.bat start ½ÇÇà
2. ¼­ºñ½º ½ÃÀÛ / Á¾·á ÆÄÀÏ»ý¼º
tomcat_start.bat ( ¼­ºñ½º ½ÃÀÛ )
C:
cd C:\Program Files\Apache Group\Tomcat 4.1\bin\
catalina.bat start
tomcat_stop.bat ( ¼­ºñ½º Á¾·á )
C:
cd C:\Program Files\Apache Group\Tomcat 4.1\bin\
catalina.bat stop
¢Â ÅèĹ Èü¸Þ¸ð¸® Á¶Á¤Çϱâ (¸®´ª½º¿ë)

vi ./startup.sh   ( ÅèĹ ½ÇÇà ÆÄÀÏ startup.sh ¼öÁ¤ )

#!/bin/sh
# -----------------------------------------------------------------------------
# Start Script for the CATALINA Server
#
# $Id: startup.sh,v 1.2 2002/01/15 02:55:38 patrickl Exp $
# -----------------------------------------------------------------------------

# resolve links - $0 may be a softlink
PRG="$0"

while [ -h "$PRG" ] ; do
  ls=`ls -ld "$PRG"`
  link=`expr "$ls" : '.*-> \(.*\)$'`
  if expr "$link" : '.*/.*' > /dev/null; then
    PRG="$link"
  else
    PRG=`dirname "$PRG"`/"$link"
  fi
done

PRGDIR=`dirname "$PRG"`
##############512m·Î °­Á¦ ¼ÂÆà : START
export CATALINA_OPTS="-Djava.awt.headless=true -Xms512m -Xmx512m"
##############512m·Î °­Á¦ ¼ÂÆà : END
EXECUTABLE=catalina.sh

########  ms, mx °ªÀº CPUÀÇ °¹¼ö¿Í MEMÅ©±â¿¡ µû¶ó ÀûÀýÈ÷ Á¶Á¤ÇÕ´Ï´Ù. (EX:-Xms512m -Xmx512m )

# Check that target executable exists
if [ ! -x "$PRGDIR"/"$EXECUTABLE" ]; then
  echo "Cannot find $PRGDIR/$EXECUTABLE"
  echo "This file is needed to run this program"
  exit 1
fi

exec "$PRGDIR"/"$EXECUTABLE" start "$@"

  Hit : 23657     Date : 2006/12/05 07:16



    
rootguy ¿äÁò¿¡ À¥¼­¹ö´Â ¼º´ÉÀÌ ÁÁÁö¸¸ ÅèĹÀ» »ç¿ëÇÒ°æ¿ì Æ©´×À» ÇÏÁö ¾ÊÀ¸¸é ¼­¹ö¸Þ¸ð¸®´Â ³²¾Æµµ´Âµ¥ ¸Þ¸ð¸® ºÎÁ·Çö»óÀÌ.... 2006/12/05  
     [°øÁö] °­Á¸¦ ¿Ã¸®½Ç ¶§´Â ¸»¸Ó¸®¸¦ ´Þ¾ÆÁÖ¼¼¿ä^¤Ñ^ [29] ¸Û¸Û 02/27 19536
1599   [overthewire.org] - leviathan1     ÇØÅ·ÀßÇÏ°í½Í´Ù
01/14 17
1598   [overthewire.org] - leviathan0     ÇØÅ·ÀßÇÏ°í½Í´Ù
01/14 13
1597   [Write Up] Crypto Cat's CTF 2024 - BabyFlow     ÇØÅ·ÀßÇÏ°í½Í´Ù
12/29 96
1596   [pwnable.kr] bof     ÇØÅ·ÀßÇÏ°í½Í´Ù
12/25 91
1595   [pwnable.kr] Shellshock[1]     ÇØÅ·ÀßÇÏ°í½Í´Ù
11/23 221
1594   ShellshockÀÇ ±âº» ¿ä¾à     ÇØÅ·ÀßÇÏ°í½Í´Ù
11/23 190
1593   [pwnable.kr] fd     ÇØÅ·ÀßÇÏ°í½Í´Ù
11/23 181
1592   VPNÀÌ ¿¬°áµÇ¾ú´Ù°¡ µµÁß¿¡ ²¨µµ À¥ ºê¶ó¿ìÀú»ó¿¡¼­ À¯ÁöµÇ´Â ÀÌÀ¯     ÇØÅ·ÀßÇÏ°í½Í´Ù
11/22 182
1591   ÇØÄ¿µéÀÌ ÇØÅ·½Ã »ç¿ëÇÏ´Â µð·ºÅ丮 °ø°£[1]     ÇØÅ·ÀßÇÏ°í½Í´Ù
11/22 225
1590   Keyboard Hooking -part2 - (Python3 ver)     ÇØÅ·ÀßÇÏ°í½Í´Ù
11/20 199
1589   [Windows API] Keyboard Hooking     ÇØÅ·ÀßÇÏ°í½Í´Ù
11/20 175
1588   [pwnable.kr] cmd1 °ø·«     ÇØÅ·ÀßÇÏ°í½Í´Ù
10/23 357
1587   netdiscover ÆÄÀ̽ãÀ¸·Î ±¸ÇöÇϱ⠠   ÇØÅ·ÀßÇÏ°í½Í´Ù
08/13 627
1586   ÆÄÀ̽ãÀ» ÀÌ¿ëÇÑ ½ÉÇà À¥ Å©·Ñ·¯     ÇØÅ·ÀßÇÏ°í½Í´Ù
08/13 507
1585   ÆÄÀ̽ã random¸ðµâÀ» ÀÌ¿ëÇÑ ¼ýÀÚ¸ÂÃ߱⠰ÔÀÓ ±¸Çö     ÇØÅ·ÀßÇÏ°í½Í´Ù
05/30 1059
1584   ÆÄÀ̽ã äÆà ÇÁ·Î±×·¥ ±¸Çö     ÇØÅ·ÀßÇÏ°í½Í´Ù
05/28 959
1583   ÆÄÀ̽㠼ÒÄÏ ÇÁ·Î±×·¡¹ÖÀÇ ±âÃÊ     ÇØÅ·ÀßÇÏ°í½Í´Ù
05/26 1111
1582   ¸®´ª½º À¥ ·Î±× ºÐ¼®     ÇØÅ·ÀßÇÏ°í½Í´Ù
05/20 735
1581   ¸®´ª½º/À©µµ¿ì º¸¾È Àåºñ ·Î±×     ÇØÅ·ÀßÇÏ°í½Í´Ù
05/20 894
1 [2][3][4][5][6][7][8][9][10]..[80]

Copyright 1999-2025 Zeroboard / skin by Hackerschool.org / Secure Patch by Hackerschool.org