Increase of Threads in Managed Nodes

Hi,
I have the following question.
I am analyzing the performance of an Weblogic OSB Cluster in a Production Environment witch is compose by 4 managed servers, with 4 GB of memory each.}
This is the Server Start of each one:
-server -Xms4096m -Xmx4096m -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:NewSize=512m -XX:MaxNewSize=1536m -XX:PermSize=512m -XX:MaxPermSize=512m -verbose:gc -XX:+PrintGCDetails -Xloggc:/export/home/applsoap/gc_ap1.log -Dweblogic.threadpool.MinPoolSize=150 -Dweblogic.threadpool.MaxPoolSize=340
Nowadays the requests peek during the day is of 15000 Request per minute.
During the day, the Memory of each managed server is around 3GB, and the Threads are around 230 and 280.
I have seen that when threads are increased over 4000 the performance of the system decrease significantly.
We are facing in the following weeks an increase in the request per minute in at least 2 times.
My question is, the parameters of the node that I can see in the Jconsole or in the Oracle Enterprise Manager will be duplicated linearly with this increase?
I mean, I have now 280 Threads with 1500 request per minute?
If I have 3000 request per minute, will I have 560 threads ?
Since I have seen that Up to 400 threads the system is Instable.
I can imagine that the increase will not be linear, but some advice regarding how to measure the performance in the installation will have with
and increase of 2 times the load will be thanked!!!
Thanks you in Advance!

As the name of the method implies the Pool returned by that method supports only a fixed number of threads.
If you want to be able to modify the number of threads after instantiation, then you could use a ThreadPoolExecutor. This class supports changing the number of threads it uses.

Similar Messages

  • Locker failed to offer due to timeout.Please increase worker thread count by increasing DeferredWorkerThreadCount in mediator-config.xml

    Can some one please assist me to get rid of the below error when trying to bring up the SOA services in Weblogic?
    "Locker failed to offer due to timeout.Please increase worker thread count by increasing DeferredWorkerThreadCount in mediator-config.xml"
    We tested the agent, node manager and everything seems to be working fine. Its persistent in UAT environment which is a clustered environment. 1st managed server for SOA is having the issue while the second one is working fine. Below are the list of manages servers in the env:
    2 managed servers for ADF,
    2 managed servers for BAM,
    2 managed servers for SOA,
    2 managed servers for WSM.
    The affected SOA1 managed server was working fine till last week and there were no changes made to the environment. Please let me know if I can furnish any further info.
    Thanks!
    Nidhi Gangadhar.
    WebLogic PortalSOA Suite

    Can some one please assist me to get rid of the below error when trying to bring up the SOA services in Weblogic?
    "Locker failed to offer due to timeout.Please increase worker thread count by increasing DeferredWorkerThreadCount in mediator-config.xml"
    We tested the agent, node manager and everything seems to be working fine. Its persistent in UAT environment which is a clustered environment. 1st managed server for SOA is having the issue while the second one is working fine. Below are the list of manages servers in the env:
    2 managed servers for ADF,
    2 managed servers for BAM,
    2 managed servers for SOA,
    2 managed servers for WSM.
    The affected SOA1 managed server was working fine till last week and there were no changes made to the environment. Please let me know if I can furnish any further info.
    Thanks!
    Nidhi Gangadhar.
    WebLogic PortalSOA Suite

  • Document Management Node Setup

    Should Document Management Node setup be available in 11.5.7 as shown in the Workflow User Guide (pg. 2-31 to 2-33, 4-5 to 4-6, 10-32 to 10-35)? The example in the manual is too generic for my DBA's or Internet people to understand it fully.
    If we are using embedded 11i workflows can we attach WORD documents or Excel spreadsheets to workflow notifications in an HP UNIX environment or do we have to be using a formal document image management system?
    How do we specifically complete the Document Management Nodes screen for a Document Management system's images?
    How do we specifically complete the Document Management Nodes screen for a document created by a PL/SQL procedure?
    If we can attach Microsoft office documents to notifications, how do we complete the Document Management Node screen?
    We are not using e-mail notifications or e-mail summaries. Users are accessing notification screens only.
    Dave Petrie
    Valspar Corporation

    David,
    The Document Management node setup is reserved for future use.
    It is possible to integrate Workflow with Oracle Internet File System and more information can be found at:
    http://otn.oracle.com/products/ifs/htdocs/workflow/workflow.html

  • Document Management Nodes

    Hi,
    I have an Item Attribute of Type 'Document' in my WF. When I go to WF monitor to launch this workflow, I see an attachment icon next to this attribute, meaning I can attach a document before launching the wf. But when I click on this icon, it gives a message 'No Document Management Nodes have been defined. Please contact your system administrator.
    What does this mean, what settings am I missing, I was going thru the documentation but didn't find anything.
    Any help!!
    Thanks!
    Shalu

    Document Management Nodes is a feature reserved for future use.
    However, you may wish to look at Integration of Oracle Internet File System with Oracle Workflow:
    http://otn.oracle.com/products/ifs/htdocs/workflow/workflow.html

  • Activating Leave Management Node in 4.7

    Hi,
    I want to activate the Leave Management subnodes in my 4.7 system.I've alreday activated the BC Set EA-HR.The main Node for LM is visible in SPRO,however the sub nodes are not available,this is because of support pack 1 for EA-HR that I have applied on my system.I can clearly see that this support pack has deleted the tables being accessed under the Leave Management Node.Hence I am unable to view the sub nodes.
    Is there any way (maybe another support pack or some configuration) that can bring back my LM functionality??
    Please help.
    Saba.

    Dear All,
    Come to know how to do that.
    Thank you.
    Regards,
    Venkat.

  • Help-- build a Thread to manage Client

    Login: it sends to Server a string= "CONNECTING" and Server will send a string = "CONNECTED" then EchoClient (is a thread which manage a connection from the outside) will call a new thread(ManageClient) with a new port to make a seperate connection.
    Problem... while running Login and click the button after run EchoClient, there is no respond
    Maybe it's too long.. Sorry and thanks for running my code and helping me
    Login class
    import java.awt.FlowLayout;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.io.BufferedReader;
    import java.io.InputStreamReader;
    import java.io.PrintWriter;
    import java.net.Socket;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JTextArea;
    public class Login extends JFrame {
         public ChatFrame chatFrame;
         private final int CONNECTED = 1;
         private final int CONNECTING = 11;
         private Socket connectSocket = null;
         BufferedReader in = null;
         PrintWriter out = null;
          * @param args
         public Login() {
              // TODO Auto-generated method stub
              setSize(50, 150);
              JButton loginButton = new JButton("Login");
              JPanel p = new JPanel();
              p.setLayout(new FlowLayout());
              p.add(loginButton);
              add(p);
    //Wait and listen the line from server
              Thread t = new Thread() {
                   public void run() {
                        try {
                             Socket connectSocket = new Socket("localhost", 903);
                             in = new BufferedReader(new InputStreamReader(connectSocket
                                       .getInputStream()));
                             out = new PrintWriter(connectSocket.getOutputStream());
                             String stringLine = in.readLine();
                             if (stringLine == "CONNECTED") {
                                  int port = in.read();
                                  chatFrame = new ChatFrame(port);
                                  chatFrame
                                            .setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                                  chatFrame.show();
                                  connectSocket.close();
                        } catch (Exception e) {
              t.start();
              //click Login button and send "CONNECTING"
              loginButton.addActionListener(new ActionListener() {
                   @Override
                   public void actionPerformed(ActionEvent e) {
                        try {                         
                             out.print("CONNECTING");
                             System.out.print("send ");
                        } catch (Exception exp) {
                             exp.printStackTrace();
         public static void main(String[] args) {
              Login login = new Login();
              login.show();
              login.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    EchoClient class
    import java.io.BufferedReader;
    import java.io.InputStreamReader;
    import java.io.PrintWriter;
    import java.net.ServerSocket;
    import java.net.Socket;
    import java.util.Random;
    public class EchoClient extends Thread {
         private ServerSocket listenSocket = null;
         private Socket manageSocket = null;
         private int[] port = new int[9999];
         private BufferedReader in;
         private PrintWriter out;
         private int line;
         private int count;
         //private ClientNode[] clientArray = new ClientNode[9999];
         private ManageClient[] manageClient;
         private final int CONNECTED = 1;
         private final int CONNECTING = 11;
         private final int DISCONECTED = 2;
         public void run() {
              try {
                   //manageClient = new ManageClient[9999];
                   listenSocket = new ServerSocket(903);
                   manageSocket = listenSocket.accept();
                   while (true) {
                        in = new BufferedReader(new InputStreamReader(manageSocket
                                  .getInputStream()));
                        out = new PrintWriter(manageSocket.getOutputStream());
                        String stringLine = in.readLine();
                        System.out.print(in.readLine());
    //wait and listen from client
                        if (stringLine != null) {
                             //if recieve a string send "CONNECTED"
                             out.print("CONNECTED");
    //"Creat a port for ChatFrame"
                             port[count] = (int) Math.ceil(Math.random() * 9999);
                             manageClient[count] = new ManageClient(port[count]);
                             manageClient[count].start();
                             out.print(port[count]);
                             count++;
                             listenSocket.close();
              } catch (Exception e) {
                   e.printStackTrace();
         public static void main(String[] args) {
              EchoClient e = new EchoClient();
              e.start();
    ManageClient class
    import java.io.BufferedReader;
    import java.io.InputStreamReader;
    import java.io.PrintWriter;
    import java.net.ServerSocket;
    import java.net.Socket;
    public class ManageClient extends Thread {
         private ServerSocket ssClient;
         private Socket sClient;
         private int port;
         public ManageClient(int port) {
              this.port = port;
         public int getPort() {
              return port;
         public void run() {
              try {
                   ssClient = new ServerSocket(getPort());
                   sClient = ssClient.accept();
                   while (true) {
                        BufferedReader in = new BufferedReader(new InputStreamReader(
                                  sClient.getInputStream()));
                        PrintWriter out = new PrintWriter(sClient.getOutputStream());
                        String s = in.readLine();
                        if (s != null)
                             out.print("have recieved");
              } catch (Exception e) {
                   e.printStackTrace();
    ChatFrame class need for running
    import java.awt.BorderLayout;
    import java.awt.FlowLayout;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.io.BufferedReader;
    import java.io.InputStreamReader;
    import java.io.PrintWriter;
    import java.net.Socket;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.JSplitPane;
    import javax.swing.JTabbedPane;
    import javax.swing.JTextArea;
    import javax.swing.JTextField;
    import javax.swing.JTree;
    import javax.swing.tree.DefaultMutableTreeNode;
    public class ChatFrame extends JFrame {
         private JTree tree = null;
         private ClientNode[] clientArray = new ClientNode[9999];
         private JTextArea textChat = null;
         private JTextField[] textBox = new JTextField[9999];
         private Socket connection = null;
         private BufferedReader in = null;
         private PrintWriter out = null;
         private int port;
         private JTabbedPane communicationTab;
         private JButton sendButton;
         public ChatFrame(int port) {
              setSize(300, 300);
              this.port = port;
              DefaultMutableTreeNode user = new DefaultMutableTreeNode(
                        "Another users");
              DefaultMutableTreeNode Client1 = new DefaultMutableTreeNode("Client 1");
              user.add(Client1);
              tree = new JTree(user);
              JScrollPane treeScrollPane = new JScrollPane(tree);
              JPanel p = new JPanel();
              p.add(treeScrollPane);
              communicationTab = new JTabbedPane();
              JSplitPane upperSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,
                        communicationTab, p);
              upperSplitPane.setContinuousLayout(true);
              upperSplitPane.setOneTouchExpandable(true);
              upperSplitPane.setResizeWeight(1);
              textChat = new JTextArea();
              textChat.setLineWrap(true);
              textChat.setWrapStyleWord(true);
              JScrollPane scroll = new JScrollPane(textChat);
              JPanel q = new JPanel();
              sendButton = new JButton("Send");
              sendButton.setSize(2, 2);
              q.setLayout(new FlowLayout());
              q.add(sendButton);
              JPanel tc = new JPanel();
              tc.setLayout(new BorderLayout());
              tc.add(scroll, BorderLayout.CENTER);
              tc.add(q, BorderLayout.EAST);
              JSplitPane underSplitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT,
                        upperSplitPane, tc);
              underSplitPane.setLastDividerLocation(1);
              underSplitPane.setResizeWeight(1);
              connectToServer();
              getContentPane().add(underSplitPane, "Center");
              sendButton.addActionListener(new ActionListener() {
                   @Override
                   public void actionPerformed(ActionEvent arg0) {
                        // TODO Auto-generated method stub
                        if (textChat.getText() != "")
                             send(textChat.getText());
                        textChat.setText("");
         public void connectToServer() {
              try {
                   connection = new Socket("serverName", getPort());
                   while (true) {
                        in = new BufferedReader(new InputStreamReader(connection
                                  .getInputStream()));
                        out = new PrintWriter(connection.getOutputStream());
                        String s = in.readLine();
                        if (s != null) {
                             textChat.append(s);
              } catch (Exception e) {
         public int getPort() {
              return port;
         public static void main(String[] args) {
              ChatFrame c = new ChatFrame(903);
              c.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              c.show();
         public void send(String s) {
              try {
                   out.print(s);
                   out.print("\r\n");
                   out.flush();
              } catch (Exception e) {
                   e.printStackTrace();
    }Edited by: rockfanskid on Oct 17, 2007 9:47 AM

    I agree with DrClap.
    Another thing: do NOT compare Strings with == unless you want to check for identity equals (as in the same object). Use String.equals() instead for equality.
    Example:
    String a = "test";
    String b = "test";
    String c = new String("test".getBytes());
    System.out.println(a.equals(b)); // true
    System.out.println(a == b); // true
    System.out.println(b.equals(c)); // true
    System.out.println(b == c); // falseThis is just a trick from Sun to confuse you ;) String's are internally pooled by the String class. Look at the javadoc of String.intern() for instance for more information. But use String.equals() in your code...

  • How to increase the thread count for JDBC adapter

    Hi ALL,
                Could someone advice me on how to increase the thread count for JDBC Adapter in Visual Admin:
    JDBC_http://sap.com/xi/XI/System.Call.maxConsumers 5
    JDBC_http://sap.com/xi/XI/System.Recv.maxConsumers 5
    JDBC_http://sap.com/xi/XI/System.Rqst.maxConsumers 5
    JDBC_http://sap.com/xi/XI/System.Send.maxConsumers 5
    I need to increase them to 10.
    Regards,
    Xier

    hi check the below links:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/806e75a0-0e01-0010-2587-fc518de8ac1a
    admin manual:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/fdb09490-0201-0010-e09e-a76388646ad0
    note:reward points if solution found helpfull.....
    regards
    chandrakanth.k

  • Calculation manager node not showing up in LCM

    Hi Folks,
    I am trying to export the Calc manager rules through LCM, I was able to do that in one of our environments, however when I try to perform
    this activity in the higher environments, I am unable to find the "Calculation Manager Rules" node node in LCM.
    (Shared services->Application groups->Planning-><App Name>-> Plantype-><App name>-> "Calculation Manager Rules" node is missing from here.
    Could you guys let me know what do I check between both the environments (the one in which calc manager node is present and one with out) to get this working?

    If you are trying to export calc manager rules, use Shared services->Calculation Manager node. If you are going against planning, it may be called just rules.
    -Sree Menon

  • Language Property of KM Repository Manager Node

    Hi Community,
    i developed a Custom Repository Manager based on the Tutorial form the Code Samples Section.
    I have a question regarding to the language of the TREX Search Results. Everything works fine, but the results have some strange languages. I have a german Site wich has the Langugage catalan. I think the Trex decides automatically which langugage the content has.
    How can i set the language-attribute in my Repository Manager manually? I tried to set the langugage to German by using the following in the function getProperties in the Node-Class:
    SystemPropertyFactory.createContentLanguageProperty("de").
    is that the right way?
    Greetz Marcus

    Hi,
    in order to re-read the config when it is changed you have to implement <b>IConfigListener</b> interface. See my reply in this thread:
    <a href="https://www.sdn.sap.com/irj/sdn/thread?threadID=99794">Re: How to read a file(Propeties files) from a respository service - IConfigListener</a>
    But I'm not sure that also works effectively with repository managers.
    For more info just let me know,
    Romano

  • How do I increase the thread limit on Linux?

    OS: Linux (or Sun Linux)
    Kernel: 2.4.9-31enterprise
    Memory: 2GB
    CPUs: 2
    Java: 1.4.1_01
    I have a dual processor Cobalt LX50 and I am running
    into a thread limit with Java. No matter what I do
    with the Java JVM parameters (heap and stack), I
    cannot get any more than 949 threads. My "top" and "vmstat" output
    shows that I am no where near my memory capacity.
    Below is a simple Java program (28 lines long) I have
    used to test this limit. My question is simply how do
    I go about increasing this limit. Is there some kernel
    parameter I can set or maybe have to recompile into
    the kernel? My /proc/sys/kernel/threads-max is 16383.
    I do not believe my ulimit settings are the problem,
    but I will post them anyway. The problem also occurs
    on non-Cobalt (plain old PCs) uniprocessor machines
    maxxing at about 1018 threads. The other interesting thing is that when I run the same program through the Kaffe VM with -Xms64M and -Xmx512M I do not run into the thread limit problem. Does anyone know what I need to change to get my thread limit up? Also, rewriting the way the program uses threads is not an option.
    [root]# ulimit -a core file size (blocks) 0
    data seg size (kbytes) unlimited
    file size (blocks) unlimited
    max locked memory (kbytes) unlimited
    max memory size (kbytes) unlimited
    open files 1024
    pipe size (512 bytes) 8
    stack size (kbytes) 8192
    cpu time (seconds) unlimited
    max user processes 8191
    virtual memory (kbytes) unlimited
    /*******************************Sample java program
    testing thread
    limits***********************************************/
    import java.util.Timer;
    import java.util.TimerTask;
    public class Reminder {
    Timer timer;
    static int cnt;
    public Reminder(int seconds) {
    timer = new Timer();
    timer.schedule(new RemindTask(), seconds*1000);
    class RemindTask extends TimerTask {
    public void run() {
    System.out.println("Time's up!");
    timer.cancel(); //Terminate the timer thread
    public static void main(String args[]) {
    System.out.println("About to schedule task.");
    cnt = 0;
    while (true) {
    new Reminder(90);
    System.out.println("Thread #" + ++cnt + "
    scheduled.");

    Confer also:
    http://forum.java.sun.com/thread.jsp?forum=37&thread=358276

  • How to increase max thread for SOAP adapter ?

    Hi PI Expert,
    I have problem with Synchronous SOAP transaction in PI 7.0 EHP1 SPS2. The interface actually using ccBPM.
    IDOC ---> ccBPM -
    > synchronous call to SOAP adapter.
    The problem is there are always timeout call from Integration server to SOAP adapter after several transaction success.
    it seems like the soap adapter is doesn't has enough thread to receive call from IS.
    the pattern is like   success, success, failed, success, success, failed.  it always 1 errror within 1 minutes for 4-5 transaction in the same minutes.
    is that any log in adapter that i can check or how to increase soap adapter thread ?
    Please advise ?
    Best Regards
    Fernand

    Hi Fernand,
    please check this blog:
    Adapter Specific Queues in PI
    /people/sunil.singh13/blog/2009/03/30/adapter-specific-queues-in-pi
    Regards,
    Gábor

  • Flexible Realestate Management Node availabilty in 4.7

    Hi All,
    Currently I am using 4.7 version (set 2.0), in this version flexible real estate can be used. But when I am looking in the SPRO I am not able to find the node flexible real estate management. Can any body please share how this can be achieved.
    Regards,
    Arjun

    Hi Franz,
    I have gone through the note, i have activated the same. but i can acess that flexible real estate by going in to the trnasaction RECACUST. but this not appearing in the SPRO as a default which appears in ECC6.0 . any idea please kindly share. 
    Regards.
    Arjun.

  • Concurrent Manager Node Name Issue

    Hi All,
    Recently one of EBS 11i (11.5.10.2 + RHEL 4.7) Node (VM Node) has been cloned to another node. So i had to change the Host name for the cloned application. I followed the meta link note 338003.1 and 341322.1. I am successfully changed the host name and able to access the application as well. When i check the Concurrent manager process's status, its showing Actual-1 and Target -1. B*ut the problem is some of process's node name is showing the previous node name (the name of the node from where cloned).* For example Output Post Processor's node name is showing the previous one and its status showing Actual - 0 and Target - 1. Please let me know why this has happened and also how can i solve this issue?
    Thanks,
    Mani

    Please run cmclean.sql script as per (Concurrent Processing - CMCLEAN.SQL - Non Destructive Script to Clean Concurrent Manager Tables [ID 134007.1]) and check then.
    If you still have the same issue, update FND_CONCURRENT_QUEUES table (TARGET_NODE column) -- Troubleshooting the "Error Occurred While Attempting to Establish an Applications File Server Connection" [ID 117012.1]
    Please also see (Concurrent Processing - CCM.sql Diagnostic Script to Diagnose Common Concurrent Manager Issues [ID 171855.1]).
    Thanks,
    Hussein

  • Managing nodes in a scene

    yeah, good evening.
    i finally i found some tim to jeffaeks ;) and i got started with some custome nodes from jim's blog. i appreciate his work, maybe i can contribute some code to the custom node section, too. i am from the deepaMehta project and we are using mainly swing and applets, that's why i got interested in jeffaeks. i hope to find some answers here, cause all the links, mixed up resources and old demos... puuh, these forums here seem to take care about the most active topics...
    some small questions are:
    a) if i have multiple nodes on my stage, am i able to stop mouse-event-propagation to the nodes/stage/canvas below my clicked node?
    b) do you know a panel or a canvas in the packages which already provides mouse-listeners?
    c) i want to mask a ImageView, perhaps with a circle but haven't tried yet.i read nile, can export this .. but i don't use nile. could it would work with svgpath or hand-coded, too?
    my big question is:
    d) how can i handle my "content: Nodes[]" at runtime? (adding/removing). should i slice my nodes into the content sequence of my stage? is this managed with the scenario-scenegraph internally? i am not into that yet, so any hints? i can't just hide them or make them invisible, cause i don't know which type of nodes my user want's to fade (instantiates) into his view.
    hopefully my questions are understandable, since i often mixup german grammar and english vocabulary, especcially when it's late :) and here in berlin we have already the 4th...
    maybe someone of you can tell me a bit more about those two topics, i would appreciate any hints and tips.
    thanks in advance,
    malte

    I think you want to use the Node attribute 'clip'. This clips the boundary of the node (both visual and mouse event wise). The example below shows that mouse events are only sent if the mouse is inside the clip region of a sub node. If you uncomment the clip area on the Group, then it is the union of the Group's clip and the Circles's clip that are used.
    package jfx_test;
    import javafx.scene.*;
    import javafx.input.*;
    import javafx.scene.paint.*;
    import javafx.application.*;
    import javafx.scene.geometry.*;
    var fillColor:Color = Color.BLACK;
    var clipShape:Shape;
    Frame {
      width: 200
      height: 200
      visible: true
      stage: Stage {
        content: [ Group {
    //      clip: Rectangle {x: 80, y: 0, width: 40; height: 200 };
          content: [ Circle{ 
            centerX: 100
            centerY: 100
            clip:  bind clipShape;
            radius: 50
            fill: bind fillColor;
          Circle{ 
            centerX: 10
            centerY: 10
            radius: 10
            fill: bind fillColor;
          onMouseEntered: function(me:MouseEvent):Void {
            fillColor = Color.BLUE;
          onMouseExited: function(me:MouseEvent):Void {
            fillColor = Color.BLACK;
          onMouseClicked: function(me:MouseEvent):Void {
            if (clipShape == null) {
              clipShape = Rectangle {x: 50
                y: 80
                width: 100
                height: 40
            } else {
             clipShape = null;
    }It is interesting to note that changing the clip shape doesn't send a mouse exited event even if the new shape moves the current mouse location outside of the chip area. You do get a mouse exited event as soon as you move the mouse though.

  • The WMFS Thread (Window Manager From Scratch)

    As the wmfs user community is growing, jasonwryan and myself though about the creation of a special thread for that tiling manager. The aim of this thread is to share informations and config files of wmfs to help new user to start with it,
    So just ask whatever and enjoy using wmfs !

    One wmfs fellow (Alm) wrote a nice python script for the status, here it is :
    #!/usr/bin/python2
    # -*- coding: UTF-8 -*-
    import urllib
    import imaplib
    import os
    import signal
    import time
    import re
    import math
    from datetime import datetime, timedelta
    from mpd import MPDClient, ConnectionError
    from subprocess import Popen, PIPE
    ### configuration
    g_users = [ ['[email protected]', 'PASSWD'] ]
    g_weather = 'chvs0003'
    g_cores = 2
    g_iface = 'wlan0'
    g_wm = 'wmfs'
    ### formatting for wmfs
    g_fmt_weather = '\\#4A4A4A\\C\\#0081DE\\{0}'
    g_fmt_gmail = '\\#4A4A4A\\@\\#AA4499\\{0}'
    g_fmt_mpd = '\\#FFC400\\{0}'
    g_fmt_mixer = '\\#0081DE\\{0}'
    g_fmt_cpu = '\\#4A4A4A\\{0:d}\\#FFCC00\\{1:d}'
    g_fmt_mem = '\\#AA2233\\{0:d}M'
    g_fmt_eth = '\\#4A4A4A\\wlan\\#FFCC00\\{0:d}/{1:d}'
    ### classes ###
    class Wi(object):
    def __init__(self, format = ''):
    self._val = ''
    self._fval = ''
    self._fmt = format
    def format(self):
    self._fval = self._fmt.format(self._val)
    return self._fval
    class WiWeather(Wi):
    _url = 'http://www.meteomedia.com/weather/{0}'
    def __init__(self, area_code, format = ''):
    Wi.__init__(self, format)
    self._url = self._url.format(area_code)
    self._fmt = format
    def update(self):
    contents = urllib.urlopen(self._url).read()
    temp = re.search("<p>([-0-9]*)<\/p>", contents).group(1)
    felt = re.search("</strong>: ([-0-9]*).*</li>", contents).group(1)
    if felt == '-':
    out = temp
    else:
    out = temp + '/' + felt
    if len(out) >= 1:
    self._val = out
    self.format()
    return 0
    else:
    return 61 # if failed, wait ~1min before retrying
    class WiGmail(Wi):
    _delimiter = '/'
    _mailbox = 'INBOX'
    _mailserver = 'imap.gmail.com'
    _port = 993
    def __init__(self, users, format = ''):
    Wi.__init__(self, format)
    self._users = users
    def fetch(self, username, password):
    # set up connection
    server = imaplib.IMAP4_SSL(self._mailserver, self._port)
    server.login(username, password)
    server.select(self._mailbox)
    # get + clean
    data = str(server.status(self._mailbox, '(MESSAGES UNSEEN)'))
    count = data.split()[5].replace(')\'])','')
    server.close()
    server.logout()
    return count
    def update(self):
    out = ''
    for u, p in self._users:
    s = self.fetch(u, p)
    if s == '':
    return 31 # if failed wait ~30 seconds before retrying
    if out == '':
    out += s
    else:
    out += self._delimiter + s
    self._val = out
    self.format()
    return 0
    class WiMpd(Wi):
    def __init__(self, host = 'localhost', port = '6600', format = ''):
    Wi.__init__(self, format)
    self._host = host
    self._port = port
    self._con_id = {'host':host, 'port':port}
    self._client = MPDClient()
    self._connected = False
    self.connect()
    def connect(self):
    try:
    self._client.connect(**self._con_id)
    except IOError as e:
    print(e)
    return False
    except ConnectionError as e:
    print(e)
    return False
    else:
    self._connected = True
    return True
    def update(self):
    if not self._connected:
    if not self.connect():
    return 1
    st = self._client.status()
    if st['state'] == 'play' or st['state'] == 'pause':
    so = self._client.currentsong()
    self._val = "%s - %s" % (so['artist'], so['title'])
    else:
    self._val = ''
    self.format()
    return 0
    class WiMixer(Wi):
    def __init__(self, args = ["amixer","sget","Master"], format = ''):
    Wi.__init__(self, format)
    self._args = args
    pass
    def update(self):
    p = Popen(self._args, stdout=PIPE).communicate()[0]
    out = re.search("([0-9]*%)",p).group(1)
    mute = re.search("(\[[onf]*\])",p).group(1)
    if mute == "[off]":
    self._val = 'mute'
    else:
    self._val = out
    self.format()
    return 0
    class WiCpu(Wi):
    def __init__(self, cores = 2, format = ''):
    Wi.__init__(self, format)
    self._cores = cores
    self._total = [0]*cores
    self._active = [0]*cores
    def format(self):
    self._fval = ''
    for i in list(range(self._cores)):
    self._fval += self._fmt.format(i+1, int(self._val[i]))
    return self._fval
    def update(self):
    usage = [0]*self._cores
    for line in open("/proc/stat"):
    r = re.search("^cpu([0-9])",line)
    if r is None:
    continue
    n = int(r.group(1))
    #space to avoid matching the first digit (cpuN)
    s = re.findall(" ([0-9]+)",line)
    total_new = 0
    for i in s:
    total_new += float(i)
    active_new = float(s[0]) + float(s[1]) + float(s[2])
    diff_total = total_new - self._total[n]
    diff_active = active_new - self._active[n]
    usage[n] = math.floor(diff_active / diff_total * 100)
    #store totals
    self._total[n] = total_new
    self._active[n] = active_new
    self._val = usage
    self.format()
    return 0
    class WiMem(Wi):
    def __init__(self, format = ''):
    Wi.__init__(self, format)
    def update(self):
    for line in open("/proc/meminfo"):
    r = re.search("([a-zA-Z]+):[^0-9]+([0-9]+).+",line)
    if r is None:
    continue
    m = r.group(1)
    n = int(r.group(2))
    if m == "MemTotal":
    total = n
    elif m == "MemFree":
    free = n
    elif m == "Buffers":
    buf = n
    elif m == "Cached":
    cached = n
    break
    self._val = int((total - free - buf - cached)/1024)
    self.format()
    return 0
    class WiEth(Wi):
    def __init__(self, iface = 'wlan0', format = ''):
    Wi.__init__(self, format)
    self._iface = iface
    self._rx = 0
    self._tx = 0
    self._time = 0
    def format(self):
    self._fval = self._fmt.format(int(self._val[0]),int(self._val[1]))
    return self._fval
    def update(self):
    for line in open("/proc/net/dev"):
    r = re.search("wlan0", line)
    if r is None:
    continue
    s = re.findall(" ([0-9]+)", line)
    rx = int(s[0])
    tx = int(s[8])
    now = time.time()
    interval = now - self._time
    rx_rate = (rx - self._rx) / interval / 1024
    tx_rate = (tx - self._tx) / interval / 1024
    self._val = [rx_rate, tx_rate]
    #store results
    self._rx = rx
    self._tx = tx
    self._time = now
    self.format()
    return 0
    class Task(object):
    def __init__(self, func, name, delay, args=()):
    self._args = args
    self._function = func
    self._name = name
    micro = int((delay - math.floor(delay)) * 1000000)
    self._delay = timedelta(seconds=int(delay), microseconds=micro)
    self._next_run = datetime.now() #to force first run now
    def should_run(self):
    return datetime.now() >= self._next_run
    def run(self):
    delay = self._function(*(self._args))
    if delay == 0:
    self._next_run = datetime.now() + self._delay
    else:
    self._next_run = datetime.now() + timedelta(seconds=delay)
    ### signals ###
    # to print stats
    def sig_usr1(signum, frame):
    global tasks
    now = datetime.now()
    for t in tasks:
    print(t._name + " will run in " + str(t._next_run - now))
    return
    # to force execution
    def sig_usr2(signum, frame):
    global tasks
    for t in tasks:
    t.run()
    return
    signal.signal(signal.SIGUSR1, sig_usr1)
    signal.signal(signal.SIGUSR2, sig_usr2)
    ### main ###
    gm = WiGmail(g_users, format=g_fmt_gmail)
    we = WiWeather(g_weather, format=g_fmt_weather)
    mp = WiMpd(format=g_fmt_mpd)
    mi = WiMixer(format=g_fmt_mixer)
    cp = WiCpu(g_cores, format=g_fmt_cpu);
    me = WiMem(format=g_fmt_mem);
    et = WiEth(g_iface, format=g_fmt_eth);
    tasks = [ Task(gm.update,'gmail',91), Task(we.update,'weather',1801), Task(mp.update,'mpd',1), Task(mi.update,'mixer',1), Task(cp.update,'cpu',2), Task(me.update,'mem',13), Task(et.update,'net',2) ]
    while True:
    try:
    for t in tasks:
    if t.should_run():
    t.run()
    now = datetime.now().strftime("%e/%m %H:%M")
    os.system('wmfs -s "%s %s %s %s %s %s %s \\#AA4499\\ %s"' % (cp._fval,me._fval,et._fval,gm._fval,we._fval,mp._fval,mi._fval,now) )
    except IOError as e:
    print(e)
    except Exception as e:
    print(e)
    finally:
    time.sleep(1)
    Last edited by aleks223 (2010-12-30 18:00:35)

Maybe you are looking for

  • New Macbook  Blue Screen problem.. Help.

    I have a problem with my mac. Whenever I turn it on, it loads up as usual, and then it shows a gray screen with an apple, loading, (yeah, the usual stuff). THEN, all of a sudden, there would be a light blue screen that would stay for about 3 seconds,

  • How to exit infinite loop when using gotopage( )

    I have 10 Pages in one script. At page 9, I want to call page 2 , page 3 and page4 The method is : RSWApp.GotoPage (2) At page 9 it will run infinite loop page2-page4, How can I stop this loop at Page4 Thanks Julia

  • Color correction and gamma

    Hi is there any software to set my computer screen for TV color/gamma, in order to see how it will look on an ordinary tv? I'm making a short animation, with framepictures from photoshop. I don't wan't to spend time setting each picture to correct co

  • How can I put my program behind a firewall or make it more secure?

    I have a client server program and I was reading through my notes. I had jotted down a recommendation to put it behind a firewall. However, I do not know how to do this in Java at all or even where to begin. How do I even create a firewall in Java? I

  • How to dynamically add column

    Hi folks, Plz tell me if u know how can i add column dynamically in oracle content management SDK webstarterapp.I am stucked here for quite sometimes.plz tell me ASAP. Regards Prasenjit