User Count.

Hi All.
First of all, I'm sorry for my English. But, I'll do my best to explain.
I'm developing Text Chat App with FMS 4, Flex 4.6.
I want to count how many users in.
I've searched enough. And I made some codes.
Server Side Code(main.asc)
application.onAppStart = function()
trace("hihihi");
application.onConnect = function(client)
application.acceptConnection(client);
userCount = application.clients.length;
// Define new client function for a nc.call().
client.callFromClient = function() {
  return userCount;
application.onDisconnect = function(client){
trace("Connection is disconnected!!!");
userCount = application.clients.length;
trace("length is " + userCount);
for(var i=0; i<application.clients.length; i++){
  application.clients[i].call("setUserCount", null, userCount);
SimpleChatTest.mxml
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
      xmlns:s="library://ns.adobe.com/flex/spark"
      xmlns:mx="library://ns.adobe.com/flex/mx"
      width="497" height="518" minWidth="955" minHeight="600" creationComplete="initApp()">
<fx:Script>
  <![CDATA[
   private var nc:NetConnection;
   private var so:SharedObject;
   private var soUserCount:SharedObject;
   private var myResponder:Responder = new Responder(onReply);
   private function initApp():void{
    nc = new NetConnection();
    nc.client = this;
    nc.connect("rtmp://127.0.0.1/SimpleChatTest/");
    nc.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
    nc.call("callFromClient", myResponder, "Server");
   private function netStatusHandler(event:NetStatusEvent):void{
    switch(event.info.code){
     case "NetConnection.Connect.Success":
      trace("Success Connection!!");
      // share chat contents
      so = SharedObject.getRemote("simpleChat", nc.uri, false);
      so.addEventListener(SyncEvent.SYNC, syncHandler);
      so.connect(nc);
      // share user count
      soUserCount = SharedObject.getRemote("userCount", nc.uri, false);
      soUserCount.addEventListener(SyncEvent.SYNC, syncHandler_UserCount);
      soUserCount.connect(nc);
      break;
   private function syncHandler(event:SyncEvent):void{
    if(so.data["simpleChat"] != undefined){
     view.text += so.data["simpleChat"] + "\n";
   private function syncHandler_UserCount(event:SyncEvent):void{
     trace("soUserCount.data[userCount] in syncHandlerMethod : ", soUserCount.data["userCount"]);
     viewCount.text = soUserCount.data["userCount"];
   /* ServerSide에서 Client length가져오기*/
   public function setUserCount(userCount:Number):void{
    soUserCount.setProperty("userCount", userCount.toString());
   // Responder function for nc.call()
   private function onReply(result:Object):void
    trace("result : " + result);
    soUserCount.setProperty("userCount", result.toString());
    trace("soUserCount.data[userCount] : ", soUserCount.data["userCount"]);
   private function sendMessage():void{
    so.setProperty("simpleChat",  textInput.text);
    textInput.text = "";
  ]]>
</fx:Script>
<fx:Declarations>
  <!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<s:TextArea x="10" y="10" width="329" height="468" id="view"/>
<s:TextInput x="10" y="486" width="246" enter="sendMessage()" id="textInput"/>
<s:Button x="264" y="487" label="Send" click="sendMessage()"/>
<s:Label x="347" y="10" text="Total Users : "/>
<s:Label x="455" y="10" id="viewCount"/>
</s:Application>
I traced result of SharedObject.
Result
Success Connection!!
result : 1
soUserCount.data[userCount] 1
soUserCount.data[userCount] in syncHandlerMethod undefined --> why?
I can't understand why sharedobject's data is dissipated??
Thanks in advanced.
Kevin.
ps. I also wanna use SharedObject in Server Side. Unfortunately I tried tried tried tried many times... But I don't know how to do it. I'm newbie to flex&FMS. Is there some example about that?

Add a method on main.asc as below:
Client.prototype.userCount = function()
     // get the number of connected users
     var count = application.clients.length;
     this.call("receiveUsercount", null, count);
And add a method in client side code ( in initApp() ) as below:
nc.receiveUsercount = function (count)
  //do code here
     trace("Total Users:" + count );    
Now call the FMS method (as below) from client side code when you want current user count details from FMS:
nc.call("userCount", null);

Similar Messages

  • How to get user count by Planning app in 11.1.2.1

    I have no. of planning apps and I need to get a user count by application.
    I tried to export the security by using LCM but the export doesn't provide the information in a readable format.
    Is there a way to generate a report where I can get the count (user ids) by planning app ?
    Thanks in advance

    Could you not get somebody to run the queries for you they quick and simple
    anyway if you have to go down the filter per user route then maybe you could use maxl and spool the output.
    e.g.
    login admin password on servername;
    spool on to "path\filename.txt";
    display filter on database appname.dbname;
    spool off;
    logout;
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • What is the powershell command to get the user count in Active Directory

    What is the powershell command to get the user count in Active Directory

    Get-ADuser
    REF: http://blogs.technet.com/b/heyscriptingguy/archive/2012/10/30/powertip-single-line-powershell-command-to-list-all-users-in-an-ou.aspx
    This post is provided AS IS with no warranties or guarantees, and confers no rights.
    ~~~
    Questo post non fornisce garanzie e non conferisce diritti

  • Portal on-line users counter

    I would like to show Portal on-line users count at start-page.
    I there any standard portlet for this?
    If there are no - how can I get this with Java or PL/SQL?

    I have the same problem but have you ever thought about a counter for every page of your portal? I' am working on this in an intranet OAS portal 10.etc .Maybe we should reconsider of extracting/publishing some modified features from a web-statistics software upon the servers we use....
    Message was edited by:
    geo_hon

  • Get the connected users count from sql server using powershell

    Hi,
    I am working on SharePoint 2013,I am having SQL server 2012.
    I want to get the Connected Users count from  sql server using power shell.
    Can any one please let me know how to implement.
    Thanks in advance.
    Regards,
    Phani Kumar R

    Sorry Tom, I dont like to hear "There is no way" :-(
    There is always a way in computer to get what you need (at least it is good as Rule of thumb). I am not sure we will find it here (in a voluntary supporting forum).
    Now we (or better the architect of their system) should think of the way :-)
    Of course doing so in the forum, while we do know the system and only got a glimpse on what is needed, is not the best idea. I will point some issues which can be related to a solution. Those are not a solotions as it is but something we can use for a solution
    once something look in the right way.
    * A web connects counter is one of the easier thing to do. The basic idea is just to use the connect event and the disconnect event an adding 1 or removing 1 from the counter. This is best to do in the application using static variable as any way the second
    the application is down the counter can be go to hell as we know there is no one connect (there for a counter do not use database usually). Using a web dot-net (or asp 3) application this is done most of the time using the global.asa/global.asax file, which
    include the application and session events. for example using the method Session_Start
    protected void Session_Start(object sender, EventArgs e) {
    // Code that runs when a new session is started
    * IIS have a build-in loging system where we can log each and every request/response or only logins users. There is lot we can do with this log files including data mining. Using small bulk insert script we can use the SQL agent to insert those logs to the
    database and get the information we need.
    * any web developer i want to believe know about the Fiddler application which we use to monitor traffic. A proxy is not the only way to to monitor traffic (it is not good for our case as this is in the client side), there are several option in the server
    side.
    * SQL trigger on logon can be use to get information on who is loging on and can be logging only specific source (like our sharepoint IP or any sharepoint application). This information (what is the application which connect to the server can be retrive
    in several solution without using a trigger as well)
    *** (I'll be brief ... I'm getting bored... probably the reader feel the same)
    * using extended events and/or profiler we can monitor any connection and save the data or just remember it in shared (static) variable (this
    blog show how to do it by the way). Again we can monitor specific application or use any filter in order to get only the sharepoint users
    .... and i can continue for several days more :-) ...
    "If there is a willing, then there's a way"
    "If you can't do it, Then someone else probably can"
    "Never say never"
    I hope this help somehow :-)
    [Personal Site] [Blog] [Facebook]

  • Need to limit the user count to 10,000 in all the Organisations

    Hi,
    We have a requirement that the user count should not exceed 10,000 in any of the organisation. If it exceeds, then OU Admin should request superadmin/xelsysadm to clean up records i.e to remove inactive accounts.
    We need Custom request screen in OIM, so that OU level admin can request/notify super admin about the increase in user count in an ou.
    Any suggestions, on how to implement this scenario, will be of great help.
    Thanks.

    Hi,
    Actually, I want that during create user, as soon as user clicks on create user page, an message should get displayed saying user count in that organisation has exceeded more than 500 and user will not be created.
    Then that OU level admin(who was creating user) should request Super admin/xelsysadm to clean up records (Custom request screen in OIM, which should notify super admin). I want custom screen/request, where the ou level admin can say/request xelsysadm that the user count in that org has exceded more than 500 and request to delete unwanted/locked and Inactive account from that OU.
    Is this requirement possible, if yes then please guide me.
    Thanks.

  • OEAP 600 Series - Maximum User Count

    Supported User Count
    Only fifteen users are allowed to connect on the WLAN Controller  WLANs provided on the 600 series at any one time. A sixteenth user  cannot authenticate until one of the first clients de-authenticates or a  timeout occurred on the controller.
    Note: This number is cumulative across the controller WLANs on the 600 series.
    For example, if two controller WLANs are configured and there are  fifteen users on one of the WLANs, no users will be able to join the  other WLAN on the 600 series at that time. This limit does not apply to  the local private WLANs that the end user configures on the 600 series  designed for personal use and clients connected on these private WLANs  or on the wired ports do not affect these limits.
    This is from the Configuration Guide for teh 600 series Office Extend AP. Is this count per AP or total per WLC? If I have 10 APs deployed to our remote users, can each AP support two simultaneous users? Would I need to use separate WLANs for each OEAP?

    Hello,
    For More information on OEAP-600, please watch the "Community Tech-Talk Series" Cisco Office Extend Access Point OEAP-600
    https://supportforums.cisco.com/community/netpro/wireless-mobility/begin-wireless/blog/2012/02/24/cisco-office-extend-access-point-oeap-600
    Thanks,
    Vinay Sharma
    Community Manager - Wireless

  • CUP maximum user count

    So I AD integrated UCM (6.1) and I see 3300 end users. Now when I flip over to CUP (7.0) I only see 1,062 users....
    My fear is that I have hit a limit on the box, but my hope is that someone has a work around.
    It is a 7825 which has a user limit of 1,000, but I had assumed that the limit was based on the number of CUP/CUPC enabled users and not on the total user count.
    I really hope there is a workaround.
    Thanks,
    -Scott

    Please clarify what you mean by CUP only sees 1062 users?  CUPS or CUPC?   In CUPS, I thought that the user list would only show the users you flagged in CUCM with the CUPS/CUPC feature.  IOW, users are only replicated when they are enabled for CUPS use.  At least, that is my understanding.
    From an LDAP query perspective.  I believe this is done by CUPC (even though CUPS has a the LDAP search string specified).
    The question I have:  How many users in CUCM are enabled with the CUPS/CUPC feature?  Is it 1062?
    HTH.
    Regards,
    Bill

  • EAS v11 - User count

    Hi,
    We have migrated to new V11 of Essbase and we have maximum limit to keep User counts till 600. Is there a way of keeping this User count and keep on checking if it has touched the limit of 600 and if yes then show an alert. Anything is fine- MAXL/script etc?
    Thanks in advance for the solution.

    In Maxl have a look at "Display Session" :- http://download.oracle.com/docs/cd/E17236_01/epm.1112/esb_tech_ref/maxl_dispsess.html
    If you want something more advanced then it is probably worth looking into one of the APIs :-http://download.oracle.com/docs/cd/E17236_01/epm.1112/esb_api_ref/launch.html
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Jabber for windows logged in user count

    We recently deployed Jabber for windows 9.1.3 to 4000 users over a 3 week span. I have been trying to monitor how many people are logged in and using the client. I am using both CUPS admin and RTMT to try and figure this out and am now confused as to what I am actually seeing.
    When looking in CUPS under application/Jabber/user settings, I have been looking at the number of users who have a client type and version listed as I found in initial testing, those fields update when a client is launched (doesn't need to be logged in). Further testing shows this isn't always correct in that I have found a client type and version for users who do not have the client launched, and nothing for a user who has Jabber launched.
    When using RTMT, the Cisco Jabber Summary produces no information, but the CUP Summary does. I see the "Current XMPP Clients Connected" chart increase through the day, but not sure if this is logged in Jabber users, or not.
    I looked in the reporting on CUPS and there does not seem to be a report for clients.
    Does anyone know of a definitive way to track how many Jabber clients are logged in?
    CUPS 8.6.4.11900-1
    CCM 8.6.2.20000-2
    Jabber for windows 9.1.3
    Thanks
    Michael

    Hi Michael,
    One of our clients reported the same issue to us recently, also running CUP version 8.6.4.11900-1.
    This was logged with TAC and it seems we are hitting Bug ID "CSCub94611 - Blank Cisco jabber Summary page"
    Details of this bug are not currently available to the public.
    Issue is fixed in CUP version 9.1.1.10000-8.
    The Cisco engineer also provided a CLI command to view how many users are logged in.
    Command is: show perf query counter "Cisco XCP CM" "CmConnectedSockets"
    Regards,
    Ismail

  • How to find out the concurrent users count in OAM?

    Hi,
    We are using OAM, OID stacks to protect our application. From oracle documentation I understand that we can limit the number of sessions per user through OAM session management. But our requirement is to limit the total number of sessions (users) who can login to the application. Is there a way to specify this total limit count in OAM or can i get it through any OAM API?
    Thanks in advance
    Aravindan

    Ok. Looks like i need to write some custom logic to fetch records from this table and then restrict the new users from login into the application. I was looking for a solution something similar to Sun java system access manager where there is an option to set session quota constraints (see the link below)
    https://docs.oracle.com/cd/E19528-01/819-5899/gcpii/index.html
    Anyways, thanks  for your response
    Aravindan

  • A User Count in a Flash Media Server Application

    hello guys, first of all, sorry for my english...
    i am making a flash media server application and i want users to see that how many users are currently connected to this application...
    i have searched on google for 2 days and i couldnt find a good tutorial for AS3.
    i have looked at fmsguru and some other tutorial websites but those wasn't enough for me to succes...
    what i am trying to make is; a text area or dynamic text (i dont know which is most suitable for this purpose) which shows the numbers of connected user and i want it change immediately when a user connects or disconnects...
    i know there is an array as "application.clients" and i know i should use "application.clients.length" in "main.asc" file to find the number of connected users BUT i can't get this number to the text area or dynamic text in my "swf file".
    PLEASE help me by explaining a simple application which uses a "main.asc" file, an "action script" file and a "swf" file. and how to get the number of "application.clients.length", how to send (or call or get) it to the "action script" file, how to show this number in a text field or dynamic text...
    i will be very appreciated if someone explain in AS3 and make me success...
    thanks for reading...

    well here you don't even need the button just tell your textfield to update everytime the server calls after a connection or disconnection. Do you know how to write actionscript at all? Because you would be well advised not to attempt media server stuff unless you know how to do the basics. Maybe you could start out with some client only applications.
    import mx.controls.TextArea;
    import mx.controls.Button;
    import mx.utils.Delegate;
    class SimpleChat_call extends MovieClip {
    private var myTextArea:TextArea;
    private var myButton:Button;
    private var _nc:NetConnection;
    private var _chatSO:SharedObject;
    private function onLoad() {
    myButton.addEventListener("click", Delegate.create(this, onUserCount));
    public function connect( rtmpString:String) {
    _nc = new NetConnection();
    _nc.owner = this;
    _nc.onStatus = function ( info ) {
    if(info.code == "NetConnection.Connect.Success") {
    trace("connected successfully");
    this.owner.connectSO( this );
    _nc.receiveUsercount = function (count) {
    var myTextArea = this.owner.myTextArea;
    myTextArea.text = count;
    _nc.connect(rtmpString);
    private function connectSO( nc ) {
    _chatSO.connect( nc );
    you didn't even try what i suggested did you because it would have worked without changing the client

  • Get user count from two tables and display in 1 row

    I have 2 tables.....
    Table1 Table2
    user date user date
    With 1 query, I want to display the user, the count of the number of times a user appears in Table1.user as count1 and the count of the number of times that same user appears in Table2.user as count2 between a specific time period. I have looked and tried things including joins, unions, nested loops but can't get anything to work. The result would appear like this:
    USER COUNT1 COUNT2
    john 100 2
    doe 1000 200
    Thank you for your time. I'm really stuck and confused.

    Hi,
    Welcome to the forum!
    I think the easiest way to do this is to do a GROUP BY query on each table separately, and then combine the results, using FULL OUTER JOIN or UNION.
    WITH     union_data     AS
         SELECT       user_name
         ,       COUNT (*)     AS count1
         ,       0              AS count2
         FROM       table1
         WHERE       dt     >= &start_dt
         AND       dt      <  &end_dt + 1
         GROUP BY  user_name                             -- Forgot this originally!
    UNION ALL
         SELECT       user_name
         ,       0              AS count1
         ,       COUNT (*)     AS count2
         FROM       table2
         WHERE       dt     >= &start_dt
         AND       dt      <  &end_dt + 1     
         GROUP BY  user_name                             -- Forgot this originally!
    SELECT       user_name
    ,       SUM (count1)     AS count1
    ,       SUM (count2)     AS count2
    FROM       union_data
    GROUP BY  user_name
    ;Edited by: Frank Kulash on Jul 29, 2009 1:34 PM
    Edited by: Frank Kulash on Jul 29, 2009 2:46 PM
    As Solomon pointed out, I forgot the GROUP BY clauses in the sub-query.
    Without the tables, I can't test it.

  • Users Count in flash media server

    hello
    i have made an application that sreaming online video and
    sound, all is work good
    now i want to get the users that listen to my application as
    Counter in Flash.
    how can i do it ???
    thanks

    anyone?

  • RUEI: Unique User Count in the Dashboard?

    Hi Guys,
    Would you happen to know how I could simply add how many unique user ID's were in our system within a 24 hour period? I just need to find a count of them to add to the dashboard. Any ideas?

    RUEI offers a reporing framework which can list you the unique userid which logged into your system.? It has to be custom report but it can be exported in any format.
    How ID gets identified is restricted to way you identify usernames in the ruei configuration.
    Syed

Maybe you are looking for

  • Open file in edit mode

    I need to open a file in edit mode. In my web part on item click I need to do some action before hand (like create a folder and copy file, then open it in edit mode). I came across the code segment below to set to a hyperlink's onClick() event <a onf

  • Sub contracting CIN scenario

    Scenario 1 I have 2 plants.One manufacturing plant & another is import & local sales plant.No manufacturing activity in 2nd plant.I am creating 2nd plant as vendor & supplying subcontracting materials to the plant from plant 1 with a PO.I am generati

  • Opening Internet Explorer files

    I have a bunch of Internet Explorer files that I transferred from my old OS 9 iMac. Now, it seems, I can't open any of them. These are web pages I saved for research purposes, and I would really like to open them if at all possible. Does anyone know

  • Why can't I select "Find"? Something is keeping it dimmed out.

    I'd like to search my email for certain content and references. I've done it before using the "Find" entry. But today that's dimmed out and I can't figure out why. Any ideas?

  • I have greyed out wifi

    My wifi is greyed out but comes on sometimes. I also can't connect to wifi how can I fix these problems