Determining session size

Does anyone know how to get live statistics of either the size of each servlet session or the average size? That is, while embedded OC4J is running, is there anyway for me to determine the total size of all objects sitting in a particular user's servlet session?
Thanks,
Jeff

Not by default.
We collect a range of stats for general OC4J operations and J2EE application execution via our DMS (dynamic monitoring service) but the size of a particular user's HttpSession object (or just the objects therein) is not covered there. We count sessions.established, sessions.open and sessions.closed to keep track of raw session usage.
Probably not what you want to hear, but you could potentially do this yourself by implementing one of the session listener interfaces so you get notified when sessions are altered, and then publishing the session-id and size of objects in the session somewhere -- text file, xmlfile, straight to console, to a database table, etc..
You could even look at using the DMS API we've exposed to make this available with the rest of the DMS statistics.
cheers
-steve-

Similar Messages

  • Oracle DBSL -  Determine / Define size of fetch array

    Hello guys,
    i have a question about the Oracle DBSL and how it determines the size of the fetch array.
    I am refering to the following documents / documentations:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/86a0b490-0201-0010-9cba-fd5c804b99a1
    Quote:
    As long as you do not program an UP TO ROWS in ABAP, the database gets as many table rows as possible per communication set (as many as fit in 32k).
    http://help.sap.com/saphelp_nw04/helpdata/en/d1/801f96454211d189710000e8322d00/frameset.htm
    Quote:
    You have to specify the size of an array before runtime. However, because you cannot know the size of the dataset the system will return, you must define a very large array to avoid an overflow.
    To circumvent this problem, the SAP Basis System translates ABAP Open SQL statements into Embedded SQL. To do this, the system defines a cursor.
    Ok but the translated embedded SQL code has also to specifiy an array fetch size (how many rows are retrieved by one fetch).
    Is this a profile parameter or is it really calculated (how many rows of a specified table would fit into 32k) dynamically in the DBSL?
    Regards
    Stefan

    Hello Michael,
    i am refering to the documentation of DEFAULT_SDU_SIZE:
    > Use the parameter DEFAULT_SDU_SIZE to specify the session data unit (SDU) size, in bytes to connections.
    > session data unit (SDU)
    >A buffer that Oracle Net uses to place data before transmitting it across the network. Oracle Net sends the data in the buffer either when requested or when it is full.
    Ok, that controls the transmit moment in the network layer.. but not the number of rows which are returned by a single FETCH call (through the OCI). (For example in sqlplus it can be set with set arraysize XX)
    I have tested also a little bit around with different sap standard tables in an ERP 2005 system.
    I have activated a SQL Trace (ST05) and done a "select * from <TAB>" via SE16 (no count limit!).
    In my tests there were fetched different number of rows -  take a look by your own:
    Time  Object    Operation  Rows   Returncode
    2.451 T100       FETCH     321      0
    1.915 T100       FETCH     321      0
    1.912 T100       FETCH     321   1406
    1.246 E071K      FETCH     109      0
    1.218 E071K      FETCH     109      0
    1.155 E071K      FETCH     109      0
    T100 (4 VARCHAR columns)
    E071K (14 columns of different types)
    So it seems like the DBSL dynamically calculates the number of rows which can be returned by a single fetch call based on the row size (number of columns and column sizes) and other unknown factors.
    If this is true, it would be really great and nothing have to be done by us (the customers!).
    But if the DBSL dynamically calculates the max. number of rows per fetch:
    Why is a "SELECT * FROM <TAB> INTO <ITAB>" preferred - the SELECT Statement in a LOOP (like in the example) is also fetching the max number of rows by each fetch, or?
    The example: http://sap.mis.cmich.edu/sap-abap/abap04/sld017.htm
    That was only a notice on some small tests, which i have done.. maybe someone knows it in detail.
    Regards
    Stefan

  • Determing session size

    Dear all,
    Had a look at the API and googled no luck sofar.
    Whats the standard way of determining the size of the session object, on the server ? We need to log this info for our application.
    I fear that we must persist the session object to the file-system as a file, and determine size this way. Does anyone know of an easier solution?
    thanks in advance.
    Ben

    Not sure about a link. It was on these forums, I think in the Java Programming Forum:
    <http://forum.java.sun.com/forum.jspa?forumID=31>
    And I believe it was uj or UlrikaJ that described it. It wasn't specifically about sessions, but about Java Objects in general.
    One thing to note is: in order for it to work, all the objects in the session must be Serializable (<http://java.sun.com/j2se/1.5.0/docs/api/java/io/Serializable.html>). The HttpSession is an interface which does not extend the Serializable interface, so you can't count on the session itself being serializable. You may need to wrap it in a class of your own before you serialize to handle serializing its contents using readObject and writeObject. In practice, Session objects probably will be serializable since they often get persisted to disk or DB when memory is low, and are passed around servers when using clustering. But that would be an implementation detail particular to each server.
    For a general overview of Serialization, see:
    <http://java.sun.com/docs/books/tutorial/essential/io/serializing.html>
    And substitue java.io.ByteArrayOutputStream (<http://java.sun.com/j2se/1.5.0/docs/api/java/io/ByteArrayOutputStream.html>) for the FileOutputStream in the code.

  • Limitation on Session Size (8K) with Clustering

              Hi.
              Is there a limitation on the session size for a clustered environment. i'm not
              sure whether its true or not. can anyone please clarify. Also is it for the entire
              session object or per user.
              Thanks
              Nitesh
              

    There is no limit as such. The only limit imposed depends on the heap allocated for
              the JVM.
              Nitesh wrote:
              > Hi.
              >
              > Is there a limitation on the session size for a clustered environment. i'm not
              > sure whether its true or not. can anyone please clarify. Also is it for the entire
              > session object or per user.
              >
              > Thanks
              >
              > Nitesh
              Rajesh Mirchandani
              Developer Relations Engineer
              BEA Support
              

  • How Can I Determine the Size of the 'My Documents' Folder for every user on a local machine using VBScript?

    Hello,
    I am at my wits end into this. Either I am doing it the wrong way or it is not possible.
    Let me explain. I need a vb script for the following scenario:
    1. The script is to run on multiple Windows 7 machines (32-Bit & 64-Bit alike).
    2. These are shared workstation i.e. different users login to these machines from time to time.
    3. The objective of this script is to traverse through each User Profile folder and get the size of the 'My Documents' folder within each User Profile folder. This information is to be written to a
    .CSV file located at C:\Temp directory on the machine.
    4. This script would be pushed to all workstations from SCCM. It would be configured to execute with
    System Rights
    I tried the script detailed at:
    http://blogs.technet.com/b/heyscriptingguy/archive/2005/03/31/how-can-i-determine-the-size-of-the-my-documents-folder.aspx 
    Const MY_DOCUMENTS = &H5&
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    Set objShell = CreateObject("Shell.Application")
    Set objFolder = objShell.Namespace(MY_DOCUMENTS)
    Set objFolderItem = objFolder.Self
    strPath = objFolderItem.Path
    Set objFolder = objFSO.GetFolder(strPath)
    Wscript.Echo objFolder.Size
    The Wscript.Echo objFolder.Size command in the script at the above mentioned link returned the value as
    '0' (zero) for the current logged on user. Although the actual size was like 30 MB or so.
    I then tried the script at:
    http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_27869829.html
    This script returns the correct value but only for the current logged-on user.
    Const blnShowErrors = False
    ' Set up filesystem object for usage
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    Set objShell = CreateObject("WScript.Shell")
    ' Display desired folder sizes
    Wscript.Echo "MyDocuments : " & FormatSize(FindFiles(objFSO.GetFolder(objShell.SpecialFolders("MyDocuments"))))
    ' Recursively tally the size of all files under a folder
    ' Protect against folders or files that are not accessible
    Function FindFiles(objFolder)
    On Error Resume Next
    ' List files
    For Each objFile In objFolder.Files
    On Error Resume Next
    If Err.Number <> 0 Then ShowError "FindFiles:01", objFolder.Path
    On Error Resume Next
    FindFiles = FindFiles + objFile.Size
    If Err.Number <> 0 Then ShowError "FindFiles:02", objFile.Path
    Next
    If Err.Number = 0 Then
    ' Recursively drill down into subfolder
    For Each objSubFolder In objFolder.SubFolders
    On Error Resume Next
    If Err.Number <> 0 Then ShowError "FindFiles:04", objFolder.Path
    FindFiles = FindFiles + FindFiles(objSubFolder)
    If Err.Number <> 0 Then ShowError "FindFiles:05", objSubFolder.Path
    Next
    Else
    ShowError "FindFiles:03", objFolder.Path
    End If
    End Function
    ' Function to format a number into typical size scales
    Function FormatSize(iSize)
    aLabel = Array("bytes", "KB", "MB", "GB", "TB")
    For i = 0 to 4
    If iSize > 1024 Then iSize = iSize / 1024 Else Exit For End If
    Next
    FormatSize = Round(iSize, 2) & " " & aLabel(i)
    End Function
    Sub ShowError(strLocation, strMessage)
    If blnShowErrors Then
    WScript.StdErr.WriteLine "==> ERROR at [" & strLocation & "]"
    WScript.StdErr.WriteLine " Number:[" & Err.Number & "], Source:[" & Err.Source & "], Desc:[" & Err.Description & "]"
    WScript.StdErr.WriteLine " " & strMessage
    Err.Clear
    End If
    End Sub
    The only part pending, is to achieve this for the 'My Documents' folder within each User Profile folder.
    Is this possible?
    Please help.

    Here are a bunch of scripts to get folder size under all circumstances.  Take your pick.
    https://gallery.technet.microsoft.com/scriptcenter/site/search?query=get%20folder%20size&f%5B0%5D.Value=get%20folder%20size&f%5B0%5D.Type=SearchText&ac=2
    ¯\_(ツ)_/¯

  • How to determine the size of an InputStream??

    Hello,
    I need to get the size of an inputstream. In fact, I am working with java.nio.channels and need to tranfer a file from within a Jar to the FileSystem.
    I have created a ReadableByteChannel from the jar resource, and a FileChannel from the FileSystem destination. The problem is that to use the FileChannel .tranferFrom(..) I need the size of the src file. But, ReadableByteChannel has no size() method.
    How can I determine the size of this InputStream??
    advanced Thanx
    here is code:
    private void copyResourcesToFileSystem(){
              try{
                        String name = getFileName(); // gets the name
                        ReadableByteChannel srcChannel =
                             Channels.newChannel(this.getClass().getClassLoader().getResourceAsStream(("dtd/"+name)));
                        File newFile = new File(TempDirCreator.getXmlDir(),name);
                        FileChannel dstChannel = new FileOutputStream(newFile).getChannel();
                        dstChannel.transferFrom(srcChannel, 0, srcChannel.size());  // doesn't work -- there is no ReadableBC.size()
                        // lets close the show
                        srcChannel.close();
                        dstChannel.close();
              }catch(IOException x){x.printStackTrace();}
              catch(Exception ex){ex.printStackTrace();}
         }

    In general the "size of an InputStream" is a meaningless concept. It's possible to have an InputStream that never terminates. So if you can't get a size from whatever you're reading from, you're out of luck.
    I missed where you explained why you need the size. I've never felt the need to know how many bytes would be passing through my code when copying from input to output.

  • How to determine the size (in pixels) of the current mode

    Hello.
    I am looking for a was to determine the size (horizontal and vertical pixels) of the current mode (SAPGUI window). I have already looked through the methods provided by class CL_GUI_CFW...
    CL_GUI_CFW=>GET_METRIC_FACTORS provides the size of you display (i.e. 1600 x 1200 pixels) and some other information I am not able to interprete.
    Futhermore I have had a look at the Methods CL_GUI_CFW=>COMPUTEPIXEL, but I don´t know how to use them.
    Has anybody of you any experiences in this topic? I would be grateful ...
    MIKE

    Sorry Manoj,
    but i didn´t find out, why these programs should be able to solve my issue. They just display a picture using the CL_GUI_PICTURE control.
    I am looking fo a way to resize a given control to the very maximum, so that it fills the whole SAPGUI window!
    Thanks anyway...
    MIKE

  • Determining the size of an Image

    I am running Pages 5.2 and I have a document with a whole load of images taken from photos. Usually I shrink the original images to keep the document size manageable but I forgot on some but I don't know which. Is there a way I can determine the size of individual images in the document ?

    In Pages v5.2, there does not appear any means to assess the image storage size, but File > Reduce File Size will offer a prompt stating an amount it can reduce the current selected image.
    Another approach is to select the image, and press command+C to put it on the clipboard. Launch Preview, ignore the open dialog, and choose File > New from Clipboard. You now have two choices to assess image size: 1) Use the Inspector (General Info panel) from the toolbar, or 2) Menu > Tools > Adjust Size...

  • How do I determine the size of an object?

    After an object is instantiated, is there anyway to determine its size (in bytes)?

    Why do you want to know? Java handles memory management for you.
    IIRC for Sun JVM 1.4:
    Objects: four bytes for each reference, boolean, byte, short, int, float or character field, eight bytes for each long or double field, plus sixteen bytes header information.
    Arrays: length * (four for reference, int or float; one for boolean or byte; two for short or character; eightfor long or double), plus sixteen bytes header information.
    Pete

  • How do I determine the size of an event (cmd I does not show any size for events).

    How do I determine the size of an Event in iPhoto? (Cmd + I does not show size information at the event level).

    If you're running iPhoto 8 (09) select the event and look at the Info pane at the lower left hand corner of the window.  It will give you the number of photos and size:
    for iPhoto 9 (11) open the Event, select all of the photos in it and open the Info drawer at the right by typing Command+i.  The number of photos and size will be at the top of the Info drawer.
    OT

  • How do you determine what size tablet to get (storage wise)?

    I looking to get a table (either the IPad or the Asus Transformer Primer.  I'm thinking of using it mostly for travel and would like to use it for internet connections, email and downloading & watching movies & music.  How can I figure out how much storage (16gb, 32gb, or 64gb) I'm going to need?
    Thanks!

    I determined what size of tablet I got (storage wise) based on two things: 1) Price and 2) Whether or not I could easily expand the storage.
    For starters, you are going to get the most bang for your buck from the Prime. The 32GB Prime costs the same as a 16GB iPad. So right there you have twice the storage for the same price.
    If you happen to fill up the 32GB of internal storage (which is not that hard since you pan on loading the thing up with movies and music) you can simply get a 32GB micro sd card for 40$ and double your space (this is not even an option with the iPad). Also, you could add even more space via the SD card slot or the USB port on the keyboard dock.
    With the iPad, once you fill the thing up, you are done. From that point on you have to manually move music and movies off the device in order to add new stuff. I used to have to do this with my old iPod touch and it was quite a tedious and annoying thing to have to do. Of course I only had 8GB to work with back then.

  • How do I determine array size in a formula node

    I am feeding an array into a formula node to perform an operation on. However the size of the array can be an arbitrary size. How can I determine its size to use for iterating through a for loop?
    I suppose that I could add another input that is fed with the array size from the array palate but I would like to know if it can be done inside the formula node itself.

    Your own advice is the only and best one.
    greetings from the Netherlands

  • How to determine the size of an iMovie09 project?

    Hello:
    I recently created a nice video of about 2 hours in iMovie09. I "shared" it to iDVD but it was about 10% too big to burn. I went back to iMovie09 and removed some time to make the project smaller but how can I determine the size of my iMovie09 projects before I send them to iDVD? I know that both time and audio will affect the size of the iMovie09 project so the time of the video is not necessarily an accurate indicator.
    Thanks!

    Welcome to iMovie Discussions.
    As long as your movie is under about 1hr 50 minutes it should fit on a DVD.
    The thing which determines how much time is available on your DVD is usually the complexity of any Menus which you add in iDVD.
    With a simple Menu, which may "eat up" 10 mins of space, you should have room for 1h 50mins of movie.
    With complex, multi-level menus, your movie running time may be reduced by about 25 mins, or possibly more.
    Keep menus simple, and you should have space for about 1hr 50mins. It's always running time which counts, NOT "size" (in GB) of your movie.

  • Determine the Size of an Object in ObjectInputStream

    Hi all,
    I have a quick question. I have a class that is being written over a socket using ObjectOutputStream and ObjectInputStream. I want to be able to set the buffer size of the socket to fit only ONE object. Can anybody tell me how to determine the size of that object?
    (Note, the object has a Properties object within it, but for the time being, it can be assumed that properties object will always be the same.)
    - Adam

    Having written it to the outputStream, thought, can
    the size be determined somehow by the inputStream?No, it can't
    This is related to my previous question (on Pushlets
    and Thread Priorities). I didn't read that one.
    I believe that it's possible
    that multiple threads are trying to write to the
    socket at the same time, and I cannot synchorize the
    input stream to get a lock on it. Do you mean the outputstream? Why can't you synchronize the method that writes to the outputstream?
    I thought this
    might be causing the data to not be sent over the
    socket until all the threads have finished. That doesn't sound correct. But you could call the flush method when an object is written.
    I
    figured if I reduced the size of the socket buffer,
    it would only accept a single object, eliminating
    this problem?I don't think so.
    /Kaj

  • How to generate a csv report to determine paper size in a pdf or pdf/a file ?

    how to generate a csv report to determine paper size in a pdf or pdf/a file ?

    Use the cfpdf tag as follows:
    <cfpdf
        action = "getinfo"
        name = "pdf_info"
        source = "C:\temp\testFile.pdf">
    My Operating System is Windows. This tag gets information about testFile.pdf, and stores it in a structure. I have given this structure the name pdf_info. This structure has the key you are interested in, namely, pageSizes.
    Pdf_info.pageSizes is an array whose indices correspond to the respective page number in the PDF. You can use this to generate Comma-Separated Values (CSV) for each page.
    <!--- Initialize CSV list --->
    <cfset csv = "">
    <!--- Add headers or first row, followed by carriage-return --->
    <cfset csv = "Page,Height,Width" & chr(13)>
    <cfloop from="1" to="#arrayLen(pdf_info.pageSizes)#" index="i">
    <cfset row_info = i & "," & pdf_info.pageSizes[i]["height"] & "," & pdf_info.pageSizes[i]["width"] & chr(13)>
    <cfset csv = csv & row_info>
    </cfloop>
    <!--- Output CSV --->
    <cfoutput>#csv#</cfoutput>
    <!--- Write CSV to file --->
    <!--- <cffile action="write" file="C:\temp\output.csv" output="#csv#"> --->
    Done!

Maybe you are looking for