- As the component is going to be in a container, the parent property of the component will be referred to the container.
- Component’s Constructor:
- Setup initial properties and do tasks that are not related to display of UI or not.
- Don’t create child components or position items.
- Constructor is called when component is created but the other lifecycle methods don’t occur until a component is added to a container.
- Gets the Style setting of the component.
- preInitialize event on the component
- UIComponent is in a very basic stage with no children added at this time.
- createChildren() method is called.
- Creates visual children of the component.
- Flex doesn’t size or position them at this point because it doesn’t know how much screen space it has.
- initialize event is dispatched by the component –
- All the component’s children are initialized.
- commitProperties() method
- Is responsible to coordinate property modifications.
- This is needed when there are multiple properties that should be set before you take action.
- This is called when selectedIndex or selectedChild is called
- Can be called by calling invalidateProperties(). Each time this method is called commitProperties() is scheduled to be called next time there is a screen repaint or refresh.
- measure() method is called only if explicit height and width is not set in the code
- Flex calls this method to determine how much screen size a component requires.
- This is not called when the height and width are explicitly set in the code as flex knows offhand how much screen size it will take.
- This method sets these four properties (or you can set it)
- LayoutManager also gets started at this point as layour manager starts with the outermost component and to size the outer most component it should know the size of its children.
- Can be called by calling invalidateSize(). Each time this method is called measure() is scheduled to called next time there is a screen refresh.
- updateDisplayList() method is called
- Is responsible for positioning of children. You can specify your children here
- It is passed two paramters
- Flex containers choose never to size one of their children smaller than minimum size but you can choose to override it.
- Can be called by calling invalidateDisplayList(). Each time this method is called updateDisplayList() is scheduled to be called next time there is a screen refresh.
- Dispatches creationComplete event.
Archive for December, 2013
NetHogs Command Line Options
Following are the nethogs command line options. Using ‘-d‘ to add a refresh rate and ‘device name‘ to monitor specific given device or devices bandwidth (default is eth0). For example, to set 5 seconds as your refresh rate, then type the command as.
# nethogs -d 5 $ sudo nethogs -d 5
To monitor specific device (eth0) network bandwidth only, use the command as.
# nethogs eth0 $ sudo nethogs eth0
To monitor network bandwidth of both eth0 and eth1 interfaces, type the following command.
# nethogs eth0 eth1 $ sudo nethogs eth0 eth1
Other Options and Usage
-d : delay for refresh rate. -h : display available commands usage. -p : sniff in promiscious mode (not recommended). -t : tracemode. -V : prints Version info.
NetHogs Interactive Controls
Following are some useful interactive controls (Keyboard Shortcuts) of nethogs program.
-m : Change the units displayed for the bandwidth in units like KB/sec -> KB -> B-> MB. -r : Sort by magnitude of respectively traffic. -s : Sort by magnitude of sent traffic. -q : Hit quit to the shell prompt.
NetHogs is a small ‘net top’ tool. Instead of breaking the traffic down per protocol or per subnet, like most tools do, it groups bandwidth by process. NetHogs does not rely on a special kernel module to be loaded. If there’s suddenly a lot of network traffic, you can fire up NetHogs and immediately see which PID is causing this. This makes it easy to indentify programs that have gone wild and are suddenly taking up your bandwidth. – NetHogs (http://nethogs.sourceforge.net/)
NetHogs is not available in official RHEL/CentOS repositories, so let us add EPEL repository to install NetHogs:
Then install NetHogs using the command:
# yum install nethogs -y