You can start it with:
Default path:
/private/tftpboot
./configure --with-pcap make make install
-i bind local IP
-d call duration ( 60s )
-l limit concurrent calls
-r call rate per second
-s username or extension
sip.example.com is remote SIP server.
2. Restart mysqld server and create replication user that your slave will use to authenticate and connect to master:server-id=1 binlog-format = mixed log-bin=mysql-bin datadir=/var/lib/mysql innodb_flush_log_at_trx_commit=1 sync_binlog=1
CREATE USER replicant@<slave-server-ip>;
GRANT REPLICATION SLAVE ON *.* TO replicant@<<slave-server-ip>> IDENTIFIED BY 'choose-secret-password';
mysqldump -u root -p --skip-lock-tables --single-transaction --flush-logs --hex-blob --events --master-data=2 -A > ~/mysql_full_dump.sql
head dump.sql -n80 | grep "MASTER_LOG_POS"
-- CHANGE MASTER TO MASTER_LOG_FILE='mysql-bin.000003', MASTER_LOG_POS=107;
server-id = 101 binlog-format = mixed log_bin = mysql-bin relay-log = mysql-relay-bin log-slave-updates = 1 read-only = 1
mysql -u root -p < ~/mysql_full_dump.sql
mysql> CHANGE MASTER TO MASTER_HOST='master-server-ip' ,MASTER_USER='replicant',MASTER_PASSWORD=''slave-server-password' , MASTER_LOG_FILE='Above head command output' , MASTER_LOG_POS='Above head command output';
mysql> START SLAVE;
mysql> SHOW SLAVE STATUS \G
mysql> STOP SLAVE;SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1;START SLAVE;
| b arp show | show /net arp all | |
| b arp all delete | tmsh delete /net arp all | |
| b class DATA-GROUP mode read | modify ltm data-group DATA-GROUP access-mode read-only | |
| b class show | show running-config /ltm data-group | |
| b cluster show | show /sys cluster all-properties | |
| b config load file.ucs | load /sys ucs file.ucs | |
| b config save file.ucs | save /sys ucs file.ucs | |
| b config sync | run /cm config-sync from-group/to-group DEVICEGROUPNAME | |
| b conn show | show /sys connection | |
| b conn show all | show /sys connection all-properties | Show all connection table properties |
| b conn ss server node-ip:node-port delete | delete /sys connection ss-server-addr node-ip ss-server-port node-port | Delete connection table entries for node-ip node-port |
| b daemon list | list /sys daemon-ha all-properties | |
| b db < key name > < value > | modify /sys db < key name > value < value > | Modify database values |
| b db Platform.PowerSupplyMonitor disable | tmsh modify sys db platform.powersupplymonitor value disable | Disables PSU alert if only one PSU in use on Dual PSU system |
| b db show | show running-config /sys db -hidden all-properties | |
| b export my.config.scf | save /sys scf my.config.scf | v10.x only |
| b export my.config.scf | save /sys config file my.config.scf tar-file my.config.tar | v11.0+ |
| b failover standby | run /sys failover standby | v11+ |
| b fo show | show /sys failover | |
| b fo standby | run /util bigpipe fo standby | v10+ |
| b ha table | show /sys ha-status all-properties | |
| b hardware baud rate | modify /sys console baud-rate | v10: sol10621 | v11: sol13325 |
| b ha table show | show /sys ha-status all-properties | |
| b httpd list | list /sys httpd | To list httpd configuration. |
| b import my.config.scf | load /sys scf my.config.scf | v10.x only |
| b import my.config.scf | load /sys config file my.config.scf tar-file my.config.tar | v11.0+ |
| b interface show -j | show /net interface -hidden all-properties | -hidden is not tab completable, but should be shown in the command output on iHealth. |
| b load | load sys config partitions all | |
| b merge | load /sys config merge | Added in v11. In v10 use bigpipe |
| b merge /path/to/file.txt | tmsh load /sys config file /path/to/file.txt merge | Merge a file into the BIG-IP configuration. Added in v11. In v10, use bigpipe |
| b mgmt show | show running-config /sys management-ip | |
| b monitor show | show running-config /ltm monitor (?) | |
| b nat show | show /ltm nat all or list /ltm nat all-properties | The two tmsh commands are required here since b nat show will list the unit preference and ARP status. Statistical information is shown via “show” while configuration information is shown via “list”. |
| b node all monitor show | list ltm node monitor | |
| b node show | show /ltm node | |
| b ntp servers 10.10.10.10 | modify sys ntp servers add { 10.10.10.10 } | |
| b packet filter all show | show /net packet-fliter | |
| b partition | list auth partition | no “show” command yet, list will only show written partitions |
| b persist | tmsh show ltm persistence persist-records | |
| b platform | show /sys hardware | |
| b pool list | list /ltm pool | |
| b pool show | show /ltm pool members | |
| b profile access all stats | ||
| b profile auth all show all | show /ltm auth profile all | The tmsh auth command does not display associated OCSP information shown by bigpipe. |
| b profile http ramcache show | show /ltm profile http | |
| b profile http stats | show /ltm profile http | |
| b profile ssl stats | show /ltm profile ssl | |
| b profile persist profile_name list all | tmsh list ltm persistence profile_name all-properties | |
| b profile tcp show | show /ltm profile tcp | |
| b profile tcp stats | show /ltm profile tcp | |
| b profile udp show | show /ltm profile udp | |
| b profile udp stats | show /ltm profile udp | |
| b profile xml show | show /ltm profile xml | |
| b reset | load / sys default-config | v10.x |
| b reset | load / sys config default | v11.x |
| b route show | show /net route all | |
| b rule < rule > show all | show /ltm rule < rule > | |
| b rule show | show /ltm rule all | |
| b rule stats reset | reset-stats /ltm rule < rule > | |
| b save | save sys config partitions all | |
| b self show | show running-config /net self | |
| b snat | show /ltm snat | |
| b snatpool show | show /ltm snatpool | |
| b software | show sys software | |
| b software desired | install sys software image NAME volume HDX.Y reboot | |
| b software desired | install sys software image NAME create-volume volume HDX.Y | v11.0+ : Creates volume and installs software. (Cannot create empty volumes in v11) |
| b software desired | install sys software hotfix NAME volume HDX.Y | Installs desired Hotfix to the specified Volume. |
| b stp show | show running-config /net stp all-properties | |
| b syslog list all | list sys syslog all-properties | |
| b syslog remote server none | modify sys syslog remote-servers none | |
| b syslog remote server test-srv host 192.168.206.47 | modify sys syslog remote-servers add {test-srv{host 192.168.206.47}} | You can append “remote-port 517″ for example to the end of the command to specify the port |
| b syslog remote server test-srv local ip 172.28.72.90 | modify sys syslog remote-servers modify {test-srv{local-ip 172.28.72.90}} | The self ip must be non-floating |
| b system hostname | modify sys global-settings hostname NEWHOST.EXAMPLE.COM | |
| b trunk show -j | show /net trunk -hidden all | |
| b trunk all lacp show | show /net trunk detail | |
| b unit show | ||
| b verify load | load sys config verify | |
| b version | show /sys version | Takes grep (but not “head” as in “b version |head”) – for example, grep on build: tmsh show sys version |grep -i build |
| b virtual address show | show /ltm virtual-address all-properties | “show” does not show the objects used by the virtual, and list does not show statistics. |
| b virtual all show all | show /ltm virtual all-properties or list /ltm virtual all-properties | “show” does not show the objects used by the virtual, and list does not show statistics. |
| b vlan all show all -j | show /net vlan -hidden | |
| b vlangroup all show all | show /net vlan-group all | |
| bigstart status|start|stop|restart SERVICE_NAME | show|start|stop|restart sys service SERVICE_NAME | |
| bpsh (?) | load sys config from-terminal merge |
1. Build the Kernel
# wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.39.tar.gz # bunzip2 linux-2.6.39.tar.gz Build the Kernel # make ARCH=um defconfig # make ARCH=um
2. Download Root-fs filesystem for Debian
# wget http://fs.devloop.org.uk/filesystems/Debian-Squeeze/Debian-Squeeze-AMD64-root_fs.bz2 # bunzip2 Debian-Squeeze-AMD64-root_fs.bz2
3. Run it!!! Voila!!
# ./vmlinux ubda=/root/Debian-Squeeze-AMD64-root_fs mem=128m umid=debian Core dump limits : soft - 0 hard - NONE Checking that ptrace can change system call numbers...OK Checking syscall emulation patch for ptrace...OK Checking advanced syscall emulation patch for ptrace...OK Checking for tmpfs mount on /dev/shm...OK Checking PROT_EXEC mmap in /dev/shm/...OK Checking for the skas3 patch in the host: - /proc/mm...not found: No such file or directory - PTRACE_FAULTINFO...not found - PTRACE_LDT...not found UML running in SKAS0 mode Adding 5627904 bytes to physical memory to account for exec-shield gap Linux version 2.6.39 (root@instructor.example.com) (gcc version 4.4.6 20120305 (Red Hat 4.4.6-4) (GCC) ) #1 Wed Jan 30 11:49:25 PST 2013 Built 1 zonelists in Zone order, mobility grouping on. Total pages: 33675 Kernel command line: ubda=/root/Debian-Squeeze-AMD64-root_fs mem=128m root=98:0 PID hash table entries: 1024 (order: 1, 8192 bytes) Dentry cache hash table entries: 32768 (order: 6, 262144 bytes) Inode-cache hash table entries: 16384 (order: 5, 131072 bytes) Memory: 123904k available NR_IRQS:15 Calibrating delay loop... 525.92 BogoMIPS (lpj=2629632) pid_max: default: 32768 minimum: 301 Mount-cache hash table entries: 256 Checking that host ptys support output SIGIO...Yes Checking that host ptys support SIGIO on close...No, enabling workaround Using 2.6 host AIO NET: Registered protocol family 16 bio: create slabat 0 Switching to clocksource itimer NET: Registered protocol family 2 IP route cache hash table entries: 2048 (order: 2, 16384 bytes) TCP established hash table entries: 8192 (order: 5, 131072 bytes) TCP bind hash table entries: 8192 (order: 4, 65536 bytes) TCP: Hash tables configured (established 8192 bind 8192) TCP reno registered UDP hash table entries: 128 (order: 0, 4096 bytes) UDP-Lite hash table entries: 128 (order: 0, 4096 bytes) NET: Registered protocol family 1 mconsole (version 2) initialized on /root/.uml/debian/mconsole Checking host MADV_REMOVE support...OK VFS: Disk quotas dquot_6.5.2 Dquot-cache hash table entries: 512 (order 0, 4096 bytes) msgmni has been set to 242 io scheduler noop registered io scheduler deadline registered io scheduler cfq registered (default) TCP cubic registered NET: Registered protocol family 17 Initialized stdio console driver Console initialized on /dev/tty0 console [tty0] enabled Initializing software serial port version 1 console [mc-1] enabled ubda: detected capacity change from 0 to 1073741824 ubda: unknown partition table Switched to NOHz mode on CPU #0 EXT3-fs: barriers not enabled kjournald starting. Commit interval 5 seconds EXT3-fs (ubda): mounted filesystem with ordered data mode VFS: Mounted root (ext3 filesystem) readonly on device 98:0. modprobe: FATAL: Could not load /lib/modules/2.6.39/modules.dep: No such file or directory INIT: version 2.88 booting Using makefile-style concurrent boot in runlevel S. .udev/ already exists on the static /dev! ... (warning). Starting the hotplug events dispatcher: udevd. Synthesizing the initial hotplug events...udevd-work[272]: kernel-provided name 'hw_random' and NAME= 'hwrng' disagree, please use SYMLINK+= or change the kernel to provide the proper name done. Waiting for /dev to be fully populated...done. hostname: the specified hostname is invalid Activating swap...done. EXT3-fs (ubda): using internal journal Cleaning up ifupdown.... Setting up networking.... Loading kernel modules...done. Activating lvm and md swap...done. Checking file systems...fsck from util-linux-ng 2.17.2 done. Mounting local filesystems...failed. Activating swapfile swap...done. Cleaning up temporary files.... Configuring network interfaces...Internet Systems Consortium DHCP Client 4.1.1-P1 Copyright 2004-2010 Internet Systems Consortium. All rights reserved. For info, please visit https://www.isc.org/software/dhcp/ modprobe: FATAL: Could not load /lib/modules/2.6.39/modules.dep: No such file or directory modprobe: FATAL: Could not load /lib/modules/2.6.39/modules.dep: No such file or directory SIOCSIFADDR: No such device modprobe: FATAL: Could not load /lib/modules/2.6.39/modules.dep: No such file or directory modprobe: FATAL: Could not load /lib/modules/2.6.39/modules.dep: No such file or directory eth0: ERROR while getting interface flags: No such device modprobe: FATAL: Could not load /lib/modules/2.6.39/modules.dep: No such file or directory modprobe: FATAL: Could not load /lib/modules/2.6.39/modules.dep: No such file or directory eth0: ERROR while getting interface flags: No such device Bind socket to interface: No such device Failed to bring up eth0. done. Cleaning up temporary files.... Setting kernel variables ...done. startpar: service(s) returned failure: hostname.sh ... failed! INIT: Entering runlevel: 2 Using makefile-style concurrent boot in runlevel 2. Starting enhanced syslogd: rsyslogd. Starting periodic command scheduler: cron. Serial line 0 assigned device '/dev/pts/0' Debian GNU/Linux 6.0 (none) tty0 (none) login: root Last login: Wed Jan 30 19:57:33 UTC 2013 on tty0 Linux (none) 2.6.39 #1 Wed Jan 30 11:49:25 PST 2013 x86_64 The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. root@(none):~# whoami root
#===============================================================================
# No debuginfo:
%define debug_package %{nil}
%define name appdynamics
%define summary AppDynamics is client agent of AppDynamic Server.
%define version 3.5.8
%define release Base
%define license GPL
%define group Applications/System
%define source %{name}-%{version}.tar.gz
%define url http://www.outcome.com
%define vendor AppDynamic
%define packager Satish Patel
%define buildroot %{_tmppath}/%{name}-root
%define _prefix /opt
Name: %{name}
Summary: %{summary}
Version: %{version}
Release: %{release}
License: %{license}
Group: %{group}
Source0: %{source}
BuildArch: x86_64
Provides: %{name}
URL: %{url}
Buildroot: %{buildroot}
%description
AppDynamics is client agent of AppDynamic Server.
%prep
%setup -q
%build
%install
install -d %{buildroot}%{_prefix}/appdynamics
tar cf - . | (cd %{buildroot}%{_prefix}/appdynamics; tar xfp -)
%post
echo " "
echo "-------------------------------------------------"
echo "- %{name} installed in %{_prefix}"
echo "- Add /opt/%{name}/jsvc in tomcat startup script."
echo "-------------------------------------------------"
%clean
rm -rf %{buildroot}
%files
%defattr(-,tomcat5,tomcat5)
%{_prefix}/appdynamics/*
# Add cron entries
%changelog
* Mon Jan 08 2013 Satish Patel
- First rpmbuild version 3.5.8
#!/usr/bin/python2.6
import csv
from openpyxl import Workbook
from openpyxl.cell import get_column_letter
f = open('/tmp/csvfile.txt', "rU")
csv.register_dialect('colons', delimiter=':')
reader = csv.reader(f, dialect='colons')
wb = Workbook()
dest_filename = r"/tmp/xls_out.xlsx"
ws = wb.worksheets[0]
ws.title = "A Snazzy Title"
for row_index, row in enumerate(reader):
for column_index, cell in enumerate(row):
column_letter = get_column_letter((column_index + 1))
ws.cell('%s%s'%(column_letter, (row_index + 1))).value = cell
wb.save(filename = dest_filename)
.data#------------------end--------------------------------------
HelloWorldString:
.ascii "Hello World\n"
.text
.globl _start
_start:
movl $4, %eax
movl $1, %ebx
movl $HelloWorldString, %ecx
movl $12, %edx
int $0x80
movl $1, %eax
movl $0, %ebx
int $0x80
perl -MCPAN -e 'installNet::SCP::Expect'
mysql -u root -B -N -p -e "SELECT user, host FROM user" mysql
satish 192.168.1.5
tom 192.168.1.5
blog 192.168.1.7
root localhost
db1.vm.linuxbug.net.in
root db1.vm.linuxbug.net.in
GRANT USAGE ON *.* TO 'satish'@'192.168.1.5' IDENTIFIED BY PASSWORD 'somePasswordMd5'
GRANT ALL PRIVILEGES ON `blogdb`.* TO 'satish'@'192.168.1.5'
We are going to use gdb to figure out why the following program causes a segmentation fault. The program is meant to read in a line of text from the user and print it. However, we will see that in it's current state it doesn't work as expected...
1 : #include
2 : #include
3 : int main(int argc, char **argv)
4 : {
5 : char *buf;
6 :
7 : buf = malloc(1<<31);
8 :
9 : fgets(buf, 1024, stdin);
10: printf("%s\n", buf);
11:
12: return 1;
13: }
The first step is to compile the program with debugging flags:
prompt> gcc -g segfault.c
Now we run the program:
prompt > a.out
Hello World!
Segmentation fault
prompt >
This is not what we want. Time to fire up gdb:
prompt > gdb a.out
GNU gdb 5.0
Copyright 2000 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...
(gdb)
We'll just run it and see what happens:
(gdb) run
Starting program: /home/dgawd/cpsc/363/a.out
test string
Program received signal SIGSEGV, Segmentation fault.
0x4007fc13 in _IO_getline_info () from /lib/libc.so.6
So we received the SIGSEGV signal from the operating system. This means that we tried to access an invalid memory address. Let's take a backtrace:
(gdb) backtrace
#0 0x4007fc13 in _IO_getline_info () from /lib/libc.so.6
#1 0x4007fb6c in _IO_getline () from /lib/libc.so.6
#2 0x4007ef51 in fgets () from /lib/libc.so.6
#3 0x80484b2 in main (argc=1, argv=0xbffffaf4) at segfault.c:10
#4 0x40037f5c in __libc_start_main () from /lib/libc.so.6
We are only interested in our own code here, so we want to switch to stack frame 3 and see where the program crashed:
(gdb) frame 3
#3 0x80484b2 in main (argc=1, argv=0xbffffaf4) at segfault.c:10
10 fgets(buf, 1024, stdin)
We crashed inside the call to fgets. In general, we can assume that library functions such as fgets work properly (if this isn't the case, we are in a lot of trouble). So the problem must be one of our arguments. You may not know that 'stdin' is a global variable that is created by the stdio libraries. So we can assume this one is ok. That leaves us with 'buf':
(gdb) print buf
$1 = 0x0
The value of buf is 0x0, which is the NULL pointer. This is not what we want - buf should point to the memory we allocated on line 8. So we're going to have to find out what happened there. First we want to kill the currently-running invocation of our program:
(gdb) kill
Kill the program being debugged? (y or n) y
Now set a breakpoint on line 8:
(gdb) break segfault.c:8
Breakpoint 1 at 0x8048486: file segfault.c, line 8.
Now run the program again:
(gdb) run
Starting program: /home/dgawd/cpsc/363/a.out
Breakpoint 1, main (argc=1, argv=0xbffffaf4) at segfault.c:8
8 buf = malloc(1<<31);
We're going to check the value of buf before the malloc call. Since buf wasn't initialized, the value should be garbage, and it is:
(gdb) print buf
$2 = 0xbffffaa8 "Èúÿ¿#\177\003@t`\001@\001"
Now step over the malloc call and examine buf again:
(gdb) next
10 fgets(buf, 1024, stdin);
(gdb) print buf
$3 = 0x0
After the call to malloc, buf is NULL. If you were to go check the man page for malloc, you would discover that malloc returns NULL when it cannot allocate the amount of memory requested. So our malloc must have failed. Let's go back and look at it again:
7 : buf = malloc(1<<31);
Well, the value of the expression 1 <<>
prompt >
Hello World!
Hello World!
prompt >
So now you know how to debug segmentation faults with gdb. This is extremely useful (I use it more often then I care to admit). The example also illustrated another very important point: ALWAYS CHECK THE RETURN VALUE OF MALLOC! Have a nice day.