Performance - Threads - Sys Resources = What's the CPU Speed n RAM ?

Hi all,
I am writing a small program based on quick port scanning (pure Java). For that purpose I'm using threads to make the connections. I am using multiple threads in parallel. While running 64 threads theres a 10% CPU usage whereas on 128 threads theres a 60% usage (On AMD 500 Mhz).
Now obviously I dont want anybody with a 233 Mhz running my program with 128 threads and surely not the one with 1 Ghz being limited to only 128 threads. Thats why I need to find out the clients resources like CPU speed, total RAM etc. How do I do that ?
Someone suggested using JNDI for windows registry. I'm not sure how to do it that way. (if anyone can provide me a little code?) Is there another way round to this problem?
Any help appreciated.

My friend
please try to understand the problem here is not of OPTIMIZATION OF THREAD SERVICES but the OPTIMAL NUMBER OF THREADS TO BE USED at certain processor speeds.
fine I agree about different performances of processors (pentium 1Ghz != AMD 1Ghz)
but surely (pentium 1Ghz ~ AMD 1Ghz ~ other 1Ghz).
and anyway in my program I'm taking the performance margins by 200Mhz to be on the safer side
i.e.
x1-x2 no of threads for say 300-500Mhz,
y1-y2 no of threads for 500-700Mhz,
z1-z2 no of threads for 700-1Ghz. Get the point.?
Heres an incomplete example of my prog (if now anyone can make out a fair idea of the problem) :
import java.net.*;
import java.io.*;
class QuickPortScan
public static void main(String args[])
long tstart,tend;
ScanThread scant=null;
String name=null,ok=null;
/* int tnum; This is the number of threads I want to calculate */
System.out.println(" Quick Port Scanner BLAH BLAH BLAH!");
System.out.print("-------------------BLAH BLAH BLAH!--------------\nEnter 'y' To Proceed: ");
try{
ok = new BufferedReader(new
InputStreamReader(System.in)).readLine();
if(ok.equals("Y")||ok.equals("y")){}
else{ System.exit(0); }
     System.out.print("Enter The HOSTNAME: ");
     name = new BufferedReader(new
     InputStreamReader(System.in)).readLine();} catch(IOException e){}
     System.out.println("Scanning 65,535 Ports, Please Be Patient...\n");
/* Now I would like to get the CPU speed here somehow
and then calculate tnum and pass it as param below */
tstart = System.currentTimeMillis();
for(int i=1;i<=tnum;i++)
     scant = new ScanThread(name,i /* ,tnum */);
     scant.start();
try{ scant.join(); }
catch(InterruptedException ine){ System.out.println("Main Thread Interrupted!"); }
     tend = System.currentTimeMillis();
     double ttaken = (tend-tstart)/1000;
     if(ttaken>59)
     System.out.println("Total Time Taken For Scan: "+(ttaken/60)+" minutes.");
     else System.out.println("Total Time Taken For Scan: "+ttaken+" seconds.");
} //END QuickPortScan class
class ScanThread extends Thread
String name;
int port,tno;
/* int nloop; This is the number of sleep-break loops calculated according to number of threads */
Socket sock;
static boolean scanFirst = true;
boolean breakOut = false,breakIn = false;
public ScanThread(String nm,int i /* ,int j */)
     name = nm;
     port = i;
     tno = i;
/* nloop = (j * whatever + whenever - together); */
public void run()
     for(int round1=1;round1<=32 /*nloop otherwise*/;round1++)
     if(breakOut==true){ break; }
     for(int round2=1;round2<=32;round2++)
try{ 
/* SOCKET
CONNECTION
IMPLEMENTATION */
     }     try{sleep(75);}catch(InterruptedException ie){}
public synchronized void portInc(int open)
     if(open==1){System.out.println("Port "+port+" Vulnerable!, Scanning...");}
     if(port==16384){System.out.println("25% Completed, Scanning Further...");}
     else if(port==32768){System.out.println("50% Completed, Scanning Further...");}
     else if(port==49152){System.out.println("75% Completed, Scanning Further...");}
     port = port + nt; // nt is the NUMBER OF THREADS
     if(port>=65536){if(scanFirst==true){System.out.println("*****SCAN COMPLETE!*****");
     scanFirst=false;} breakOut=true; breakIn=true;}
} // END ScanThread class

Similar Messages

  • What is the CPU speed of A6 Chip

    and RAM capacity so. thanks

    <http://www.idownloadblog.com/2012/09/27/a6-varies-clock-speed/>
    <http://www.anandtech.com/show/6297/iphone-5-memory-size-and-speed-revealed-1gb-l pddr21066>

  • What is the cpu architeture of solaris version of BPEL bundle, x86 or SPARC

    Hello,
    I'd like to know what is the cpu architeture of solaris version of BPEL bundle, x86 or SPARC located here: http://download.oracle.com/otn/solaris/ias/1012/as_sun_bpel_101200.cpio
    The file is more than 400Mb in size, so I need to know before downloading.
    Thanks.

    hi,
    are there any plans to release it for x86 (32 bit) platform. I'm also interested in testing beta versions of oracle software (specifically bpel, jdeveloper) on solaris 10 x86 platform, is there any beta CD available for these purposes?
    thanks.

  • What is the cpu fan part no for dv6 2060ea

    what is the cpu fan part no for dv6 2060ea

    Hi
    Please find the web link given below check the part number under page 4-39 Removal and replacement procedures will let you know how to replace the part and the part number as well.
    http://h10032.www1.hp.com/ctg/Manual/c01860375.pdf
    Let us know how it goes!
    "I work for HP."
    ****Click the (purple thumbs up icon in the lower right corner of a post) to say thanks****
    ****Please mark Accept As Solution if it solves your problem****
    Regards
    Manjunath

  • I have a 4 month long text message thread conversation. What's the quickest way to get to the very beginning of the conversation?

    I have a 4 month long text message thread conversation. What's the quickest way to get to the very beginning of the conversation?

    The startup.exe file is locate in the \NI-RT\STARTUP directory. 'cd NI-RT' then 'cd STARTUP' should get you to the right place after making the connection with ftp. I don't recognize PH_EXEC.EXE. Logging in as anonymous is fine. I don't recall seeing documentation on the file structure and locations on the module but I'm sure there is some. I just wandered around w/ftp.
    The program to update the node should be below. Enter the IP address, the green light will confirm the node is found.
    The version function scans the existing startup.exe for a string beginning and ending with " RU Version " and prints everything in between as the version.
    The autostart function will copy the existing ni-rt.ini file to your computer, mod
    ify the autostart as requested, then put the file back. Leaves the copy on the PC, which can be handy.
    Send file will request a file of the format startup*.dat which will be renamed startup.exe and ftp'd to the module. Lets you keep version numbers in the filename on the PC side. Your directory structure probably won't match mine so you'll have to browse for your file.
    Reboot module reboots the module.
    Hope this is useful, let me know if anything doesn't make sense. Thanks.
    Matt
    Attachments:
    RNconfig.exe ‏855 KB

  • Will Result Cache improve the database performance in 11g? what is the max size of Result Cache?

    Will Result Cache improve the database performance in 11g? what is the max size of Result Cache?

    Thanks for convincing me I really need a new laptop...
    SQL> select /*+ result_cache */ count(*) from emp,emp,emp,emp,emp,emp,emp;
      COUNT(*)
    105413504
    Elapsed: 00:00:52.94
    SQL> select /*+ result_cache */ count(*) from emp,emp,emp,emp,emp,emp,emp;
      COUNT(*)
    105413504
    Elapsed: 00:00:00.01
    SQL> select /*+ result_cache */ count(*) from emp,emp,emp,emp,emp,emp,emp;
      COUNT(*)
    105413504
    Elapsed: 00:00:00.01
    SQL> select count(*) from emp,emp,emp,emp,emp,emp,emp;
      COUNT(*)
    105413504
    Elapsed: 00:00:45.08
    SQL> select count(*) from emp,emp,emp,emp,emp,emp,emp;
      COUNT(*)
    105413504
    Elapsed: 00:01:16.29
    SQL>  select count(*) from emp,emp,emp,emp,emp,emp,emp;
      COUNT(*)
    105413504
    Elapsed: 00:01:18.63
    Message was edited by: Hoek
    The result cache seems to have lagged a bit for the first hintless query..

  • What is the minimum speed Telstra guarantees ADSL 2+ to connect at?

    What is the minimum speed Telstra guarantees ADSL 2+ to connect at? I asked a Telstra sales person what the minimum speed was they said the minimum was 8 Mb/s. I asked for that in writing but they could not find it, nor could they find the minimum speed in any documentation. Am I correct in thinking the minimum speed guaranteed by Telstra (for ADSL 2+) is 256 Kb/sec?

    Hi jjobrien, Not since the 90s has anyone considered 0.33mbps to be a good speed, so I can understand your frustration with this.  What affects your ADSL speed The speed achieved on ADSL depends on a number of factors, the main one being the cable distance between your premises and the DSLAM. Whirlpool have an article that explains the relationship between distance and speed very well and you can view it here: http://whirlpool.net.au/wiki/dslam_speeds There are also DSLAMs that are affected by high demand, and lowering the overall speed available to customers. We are working on upgrading these exchanges and as upgrades are planned, these can be viewed here: http://telstrawholesale.com.au/download/document/tw-report-backhaul-upgrade.xls The configuration of the equipment and internal wiring of your home can also have a big part to play in speed results. How to check your equipment It is possible that there is a fault within network (and not just a matter of cable length), but to confirm this we ask customers to perform an isolation test. We do this on every call as it can not only resolve or identify the issue sooner for customers, but also prevents an unnecessary technician visit and the possibility of an incorrect call out charge. You have already checked these when you called previously, but to make sure a simple fix hasn't been missed, please take a look at this link for the things we look for:  http://crowdsupport.telstra.com.au/t5/General-Internet-KB/How-to-perform-an-Isolation-Test/ta-p/5501... In some circumstances, applying a line profile can provide more stability on the network. This next link provides information on how this works and how customers can manage this setting.  This is mainly used for customers experiencing disconnections, however in some cases can also improve speed if the issue is caused by packet loss. https://go.telstra.com.au/helpandsupport/-/adsl-line-profiles [Note: after logging in, some customers will be redirected to My Account and need to perform the following steps to then select Account Services then My BigPond from the menu located at the top right of the page.] If you are connected to your modem via WiFi, then this is also an area where speed can be lost. This WiFi Troubleshooting link may be helpful: http://crowdsupport.telstra.com.au/t5/General-Internet-KB/WiFi-Troubleshooting/ta-p/107516     If you have confirmed that the above has been done, and you would like for us to assist you further, please provide your contact and account details via the online form that I will send via private message. Please allow up to 5 business days for a response as we respond to each one in the order that it was submitted. - Shelly  Wow. Thanks Shelly. I could all do that, but given I have been onto this issue for years on end, and Telstra have freely admitted that their infrastucture is inadequate of delivery their own quoted minimum speeds, I think you are being completely unreasonable.I can understand that getting cutomers to do your work for you is better for you economically, and that using your own staff and technichians would cut into your profits, reported to be 3.8 Billion last year, I get that, I'm in business too, but we have a contract, you and I, and I'm fulfilling my part of that contract and you are not.My part says that I will pay you. Your part says that you will deliver a service.So as I see it, and I'm not a comercial contract lawyer, perhaps you are, maybe "Ira" from billing is, who knows, but as I see it you have a responsibility to either A: upgrade the service - we both know that is not going to happen, because I have been informed by Telstra directly that no upgrade is scheduled, and I followed the link you sent me to report/backhaul-upgrade.xls to a blank document that I couldn't make sense of, or B: change the contract and charge me far less. I propose that you charge me on a pro rata basis. If you deliver 25% speed, I pay 25% fee. You must understand here, I'm not proposing that upgrade a DSLAM and/or that you dig a trench and lay a fancy new cable to my house just so that I cmay enjoy a first world luxury, Im not saying that. What I am saying is that we have a billing issue.How do you see it?John. 

  • What is the max amount of RAM that I can install using Snow Leopard?

    What is the max amount of RAM I can install in my MacBook Pro? Does having Snow Leopard raise the RAM limit?

    Michael Velasquez II wrote:
    Despite only being able to read 3GB, what is the better way to go?
    qty(1) 2GB and qty(1) 1GB Stick
    or
    (2) 2GB sticks?
    In general, for best performance, it's best to match up the same size modules in each slot (2x2 in this case). However, given that it's only going to read 3GB, I'm not sure if that holds true here.

  • I have an ipad 2 and when connected to my wifi at home it will not download and play you tube videos quickly.  Do I need to upgrade my connenction speed?  What is the optimal speed?

    I have an ipad2.  When connected to my wifi at home it will not download you tube videos for easy viewing.  Do I need to upgrade my connection speed?  Would 3 Mbps be enought or do I need to go to 6 Mbps.  I mainly use my ipad to view emails, browse the internet and watch you tube videos.
    thanks - Michelle

    Welcome to Apple Support Communities.
    There are a number of factors in the 'speed' equation. Any or all of them can affect the 'observed' speed of your connection.
    1. Are you in a neighborhood full of WiFi routers (and thus, lots of WiFi interference)? I can 'see' at least 22 other WiFi routers from my living room!
    2. What is the maximum connect speed and band and bandwidth available from your wireless router. Is it 802.11n or the older 802.11a/b/g? 300Mbits or 150Mbits? 2.4Ghz or 5Ghz or both? Does your router measure (QoS) Quality of Service and can it change 'channels' automatically?
    3. What is the observed strength of your wireless connection? Are you getting at least 80% signal when connected? Are there other people in your family also using significant bandwidth at the same time (Netflix, streaming video, streaming audio, game systems)
    4. What is the "advertised" speed of your current ISP connection?
    5. What is the measured throughput of your current setup.  Go to speedtest.net or use the free speedtest.net app available in the App Store.  Try several times, from different locations in your home, and at different times of day and night.
    I have AT&T DSL advertised at 3Mbit/sec down and 512Kbit/sec up. My Speedtest.net measured throughput is about 2.4 Mbit/sec downstream and upstream is about 0.4Mbit/sec. I'm using a Motorola Netopia 2210-2 DSL modem. I have no problem viewing YouTube videos and other mobile video content on the iPad 2.  I'm connected wirelessly to a D-Link DIR-655 Gigabit router rated at 150Mbps at 2.4Ghz (only) with 802.11 b/g/n enabled. The interior of my home is within a range of 30-50 feet from the router and no more than 1 wall.  It is a single level concrete slab foundation of about 1500 sq. ft. with cathedral ceilings. I have successfully streamed ESPN3.com on my MacBook at the same time my son was streaming another ESPN3.com game on his MacBook Pro. I've streamed YouTube videos while my son was watching a NetFlix movie on his Wii game system. He's also successfully used Skype for extended 'teleconferences.' None of my devices are connected to HDMI on a large screen TV. 95% of the time, I can do iChat video without any signal breakup to my son (who is at a college with a Gigabit (1000Mbit) wired connection!). 5% of the time the connection drops. We haven't tried FaceTime (designed for mobile connections to be much less bandwidth-intensive, from what I understand) simply because we both have iChat on our computers.
    So for me, a 3Mbit DSL connection is absolutely adequate, given all the other parameters mentioned. As the car manufacturers say, "Your mileage may vary."
    Message was edited by: kostby

  • What's the maximum speed that AirPort Extreme can share with Wifi?

    The thing is that I am going to buy a new Wifi Router, but I was considering an AirPort Extreme from Apple but is not specify what's the maximum speed of Internet connection for the Wifi to share, I know that the limit might depend on my service provider, but I don't know what is the theoretical maximum of the AirPort Extreme, does anybody knows?

    1,000 Mbps on an Ethernet connection
    450 Mbps on a wireless connection, assuming you have a new computer and it has line of sight with the AirPort Extreme. Otherwise, the speed will be lower due to obstructions absorbing the signal.

  • What is the mbps speed of AirPort Extreme?

    What is the MBPS speed of the AirPort Extreme 5th Generation?

    Ethernet....1,000 Mbps
    Wireless....up to 450 Mbps
    But, your Internet connection will be no faster than what your service plan provides to you....probably something in the 10 to 20 Mbps range more or less.

  • What is the max amount of ram can I put in my Macbook Pro (2010 Model)?

    I was wondering what is the max amount of ram can I put in my Macbook Pro?
    Here is some specs of my macbook pro:
    Version: 10.7.4 (Lion)
    Processor: 2.66 Ghz Intel Core i7
    Memory: 4 GB 1067 Mhz DDR3
    Also I bought my macbook pro in 2010 when I had Snow Lepoard on it.

    MacBook Pro
    https://discussions.apple.com/community/notebooks/macbook_pro
    https://discussions.apple.com/community/mac_os?view=discussions 
    http://www.apple.com/support/macbookpro

  • What is the maximum amount of RAM I can install in a late 2011 Macbook Pro 17"?

    What is the maximum amount of RAM I can install and will be suported in a late 2011 Macbook Pro 17"?
    Thank you,
    Patrice

    http://www.everymac.com/systems/apple/macbook_pro/specs/macbook-pro-core-i7-2.4- 17-late-2011-unibody-thunderbolt-specs.html
    Although Apple states a maximum of 8 GB, OWC (macsales.com) has tested 16 GB, so if you want to install 16 GB, I'd go with OWC as they tested it and do guarantee their RAM to work with Macs.

  • HT204350 What is the transfer speed?

    What is the transfer speed using Thunderbolt port between two Macbooks with OS X Maverics platfrom?

    Thunderbolt gives you two channels on the same connector with 10Gb/s of throughput in both directions. Ultrafast, ultraflexible
    Thunderbolt 2 pushes that to 20Gb/s.
    http://www.apple.com/thunderbolt/
    http://news.cnet.com/8301-17938_105-20088164-1/thunderbolt-vs-usb-3.0-why-its-a- lose-lose/
    http://reviews.cnet.com/8301-13727_7-57614844-263/how-to-transfer-large-amounts- of-data-between-macs-quickly/
    http://arstechnica.com/apple/2013/10/os-x-10-9-brings-fast-but-choppy-thunderbol t-networking/
    http://support.apple.com/kb/HT5872?viewlocale=en_US&locale=en_US

  • What is the average speed for the fans? Mine seem really slow.

    What is the average speed for the fans in a MacBook Pro? When my computer is fairly idle, like right now, the fans are at roughly 1000 rpm each. Is that normal? I have seen posts where the fans are 2500-5000 rpm, so mine seem a bit low. That may explain why my computer has been getting hotter more quickly lately - this started happening after Apple replaced my logic board a few days ago.

    I installed smcFanControl2 and according to that program, Apple's defaults are 2,000RPMs and the program will not let you set it any lower than that because of the increased risk of damage.
    My fans are always at 2,000RPMs during normal usage, and then once I fire up a DVD or Photoshop it usually goes up to the 3,000s or so.

Maybe you are looking for

  • IPhoto downloads some pix & video but not others in the same format

    For the past two weeks iPhoto is giving me error messages on some of the photos and videos I try to import from my SD card. I never had this problem before but it will import some of the photos and MPEG-4 videos but at the end, it lists all the ones

  • My computer (windows XP) nor itunes is recognizing my 4g Ipod touch and I need to restore it. please help...

    So today I decided to change my Itouch password. After realizing the code was an awkward movement for my fingers I changed it to something easier. HOWEVER I ended up forgetting the code and locking myself out. I then learned I had to recover my ipod,

  • How to erase all from a TX and use a new user name?

    I just got a used TX. It has all of the old info on it and of course the user name. I want to install my medical software etc and get rid of everything on the TX. I changed my user name on the desktop Palm software but it keeps reloading the informat

  • HT203167 authorized on my computer

    I am a long-time iTunes customer, and have had little problems here an there with importing my music from backups, but nothing major.  After a recent backup restoration of my iTunes library onto a new computer, some of my songs are not "authorized" t

  • Personalize link is missing

    hi   we are having ep6.0 sp12, and when i login, i am not able to see the personalize link in the mast head view where i can set up the portal theme/portal language/ workprotect mode etc...    I logged in as a super adminstrator..will it not come by