Wednesday, November 25, 2009

How To:Linux change or rename user name and UID?

Task: Change username from tom to jerry

Type usermod command as follows:
# id tom
# usermod -l jerry tom
# id jerry
# id tom

Task: Change user tom UID from 5001 to 10000

Type usermod command as follows
# id tom
# usermod -u 10000 tom
# id tom

NOTE:Original source ...

Friday, November 13, 2009

Network Broadcasting and Multicasting (explained)

Routing table
Computer NetWorking
Internet Protocol (IP) Addressing

Network interface cards are usually programmed to listen for three types of messages. They are messages sent to their specific address, messages broadcast to all NICs, and messages that qualify as a multicast for the specific card. There are three types of addressing:

Unicast - A transmission to a single interface card.
Multicast - A transmission to a group of interface cards on the network.
Broadcast - A transmission to all interface cards on the network. RFC 919 and 922 describe IP broadcast datagrams.
Limited Broadcast - Sent to all NICs on the some network segment as the source NIC. It is represented with the 255.255.255.255 TCP/IP address. This broadcast is not forwarded by routers so will only appear on one network segment.
Direct broadcast - Sent to all hosts on a network. Routers may be configured to forward directed broadcasts on large networks. For network 192.168.0.0, the broadcast is 192.168.255.255.
All other messages are filtered out by the NIC software unless the card is programmed to operate in promiscuous mode to perform network sniffing.

Broadcasting

The types of broadcasting uses on TCP/IP that I know about are:

ARP on IP
DHCP on IP
Routing table updates. Broadcasts sent by routers with routing table updates to other routers.

The ethernet broadcast address in hexadecimal is FF:FF:FF:FF:FF:FF. There are several types of IP broadcasting:

The IP limited broadcast address is 255.255.255.255. This broadcast is not forwarded by a router.
A broadcast directed to a network has a form of x.255.255.255 where x is the address of a Class A network. This broadcast may be forwarded depending on the router program.
A broadcast sent to all subnetworks. If the broadcast is 10.1.255.255 on network 10.1.0.0 and the network is subnetted with multiple networks 10.1.x.0, then the broadcast is a broadcast to all subnetworks.
A broadcast sent to a subnet in the form 10.1.1.255 is a subnet broadcast if the subnet mask is 255.255.255.0.
Multicasting

Multicasting may be used for streaming multimedia, video conferencing, shared white boards and more as the internet grows. Multicasting is still new to the internet and not widely supported by routers. New routing protocols are being developed to enable multicast traffic to be routed. Some of these routing protocols are:

Hierarchical Distance Vector Multicast Routing Protocol (HDVMRP)
Multicast Border Gateway
Protocol Independent Multicast
Since IP is not a reliable network protocol, a new reliable multicast protocol that works at the transport layer and uses IP at the network layer has been developed. It is called Multicast Transport Protocol (MTP)

Ethernet Addressing:
The internet assigned numbers authority (IANA) allocates ethernet addresses from 01:00:5E:00:00:00 through 01:00:5E:7F:FF:FF for multicasting. This means there are 23 bits available for the multicast group ID.

IP Addressing:
An IP multicast address is in the range 224.0.0.0 through 239.255.255.255. In hexadecimal that is E0.00.00.00 to EF.FF.FF.FF. To be a multicast address, the first three bits of the most significant byte must be set and the fourth bit must be clear. In the IP address, there are 28 bits for multicasting. Therefore there are 5 multicasting bits that cannot be mapped into an ethernet data packet. The 5 bits that are not mapped are the 5 most significant bits.

Monday, October 26, 2009

setting the Cadence environment variables from script (how to)?




NOTE: This script was tested, see the images above, you can change it according to your needs.

### setup.IC
# NC // Linux 64 bit Machine 
# to run this script switch from "bash" to "tcsh" OR "csh"
# Example:
# bash_linux_prompt:> tcsh (if not installed tcsh try "csh", else, install one of them, better is to install "tcsh".)
# to install: as root run this command: zypper in tcsh (see google how to install on opensuse) ;)
# tcsh(or csh)_linux_prompt:> source /setup.IC
# tcsh(or csh)_linux_prompt:> icfb &
# the CIW should start ...

# NOTES:
# =. After instalation make sure that you have the follow link in :
#    ln -s tools./platform/ tools
# =. Tooladmin's customizable .cdsinit should be in ${CDS_ROOT}/.cdsinit
# =. The follow line need to be present in $HOME/.cdsinit if you have to run Calibre
#    load("$MGC_HOME/shared/pkgs/icv.ss6/tools/queryskl/calibre.skl")


############################
##        Cadence         ##
## Custom IC Design Tools ##
############################


setenv OS_TYPE   `/bin/uname -s`
setenv HOSTNAME  `/bin/hostname`


#############
## License ##
#############

# NOTE: change the line bellow according to your needs (this is the license path?)
setenv CDS_LIC_FILE /usr/licensas/license_cadence.dat


###############
##  Cadence  ##
##   Setup   ##
###############

if ( $OS_TYPE == 'Linux' ) then
   version_:
# -------------------------------
   echo "=========================================="
   echo "        __== Owner /your_name/ ==__"
   echo "------------------------------------------"
   echo "Custom IC Design Tools ver. 5.1.41     [1]"
   echo "Custom IC Design Tools ver.  6.10      [2]"
#  echo "Custom IC Design Tools ver. ...        [3]"
#  echo "Custom IC Design Tools ver. ...        [4]"
   echo "------------------------------------------"
# -------------------------------
   echo " "
   echo -n "Select version ([q] - quit; default [1]): "
   set ver=$<
   echo " "
   echo "========================="
   echo "INFO: "
# -------------------------------
   if ( $ver == q ) then 
       echo "Exit: DONE!"  
       echo "========================="
       exit 1
   else if ( $ver == 1 || $ver == "" ) then
      setenv CDS_ROOT  /usr/tools/cad/cadence/ic5141/current
      set vername="IC 5.1.41"
      echo "The version is: $vername => License path is: CDS_LIC_FILE = $CDS_LIC_FILE"
      echo "Done!"
   else if ( $ver == 2 ) then
#   Note: configure the path for IC610 version ...
    echo " ---------------------"
    echo "NOTE: You haven't yet configured this script to run IC610 version!"
    echo " -->  Need your intervention!"
    echo "      Please, set the correct path CDS_ROOT and CDS_LIC_FILE (if needed)"
    echo " ---------------------"
#    setenv CDS_ROOT  where_is_your_ic610? 
#    setenv CDS_LIC_FILE 
    set vername="IC 610"
    echo "The version is: $vername => License path is: CDS_LIC_FILE = $CDS_LIC_FILE"
    echo "Done!"
# -------------- have more versions? --------
#   else if ( $ver == 3 ) then
#      setenv CDS_ROOT  
#    set vername="IC xyz"
#    echo "The version is: $vername => License path is: CDS_LIC_FILE = $CDS_LIC_FILE"
#   else if ( $ver == 4 ) then
#      setenv CDS_ROOT  
#    set vername="IC xyz"
#    echo "The version is: $vername => License path is: CDS_LIC_FILE = $CDS_LIC_FILE"
   else
      echo "Wrong version!"
      goto version_
   endif
endif
# ------------------------
#   Is your machine 64 BIT? (some feature in Cadence can be switched to 64 BIT /Layout, spectre, etc. see documentation/)
#   if ( $HOSTNAME == 'your_hostname_here' ) then
#      setenv CDS_AUTO_64BIT  ALL
#   else
#      setenv CDS_AUTO_64BIT  NONE
#   endif

echo " "
echo "========================="
#echo "Comment this if solved"
echo "Note: Try 'setenv LD_ASSUME_KERNEL 2.6.19'"
echo "Cadence set this variable in 'icfb' startup script"
echo "You should change it in the startup script"
echo "if not, the setenv is overwriten, resulting no effect!"
echo "========================="

### Variables
# ------------------------
setenv CDS_INST_DIR                    $CDS_ROOT/tools/dfII
setenv CDS_LIB_PATH                    ${CDS_ROOT}/tools/lib:${CDS_ROOT}/lib:${CDS_ROOT}/dfii/lib:${CDS_ROOT}/spectre/lib/mdl
setenv CDS_Netlisting_Mode             Analog                                ;# also can be: Digital or Compatibility
setenv CDS_NUM_USER_COLORS             85
setenv CDS_SITE                        $CDS_ROOT/share
setenv CDS_USE_PRIVATE_CAMP            True
setenv CDS_VHDL                        $CDS_ROOT/tools/leapfrog
setenv CLS_CDSD_COMPATIBILITY_LOCKING  NO
setenv SPECTRE_DEFAULTS                " +param $CDS_ROOT/tools/spectre/etc/limits/range.lmts"
setenv TNT_INST_DIR                    $CDS_ROOT


### Libraries
# ------------------------
if ( $?LD_LIBRARY_PATH ) then
    if ( $LD_LIBRARY_PATH == "" ) then
 setenv LD_LIBRARY_PATH ${CDS_LIB_PATH}
    endif
    if ( $LD_LIBRARY_PATH !~ *${CDS_LIB_PATH}*) then
 setenv LD_LIBRARY_PATH ${CDS_LIB_PATH}:${LD_LIBRARY_PATH}
    endif
else
    setenv LD_LIBRARY_PATH  ${CDS_LIB_PATH}
endif


### Mans
# ------------------------
if ( $?MANPATH ) then
    if ( $MANPATH == "" ) then
 setenv  MANPATH ${CDS_ROOT}/share/man:${CDS_ROOT}/tools/stream_mgt/man
    endif
    if ( $MANPATH !~ *${CDS_ROOT}/share/man*) then
 setenv  MANPATH ${CDS_ROOT}/share/man:${MANPATH}
    endif
    if ( $MANPATH !~ *${CDS_ROOT}/tools/stream_mgt/man*) then
        setenv  MANPATH ${CDS_ROOT}/tools/stream_mgt/man:${MANPATH}
    endif
else
 setenv  MANPATH ${CDS_ROOT}/share/man:${CDS_ROOT}/tools/stream_mgt/man
endif


### Paths
# ------------------------
if ( " $path" !~ *\ ${CDS_ROOT}/tools/bin\ * ) then
set path = ($CDS_ROOT/tools/bin $path)
endif
if ( " $path" !~ *\ ${CDS_ROOT}/tools/concice/bin\ * ) then
set path = ($CDS_ROOT/tools/concice/bin $path)
endif
if ( " $path" !~ *\ ${CDS_ROOT}/tools/plot/bin\ * ) then
set path = ($CDS_ROOT/tools/plot/bin $path)
endif
if ( " $path" !~ *\ ${CDS_ROOT}/tools/dracula/bin\ * ) then
set path = ($CDS_ROOT/tools/dracula/bin $path)
endif
if ( " $path" !~ *\ ${CDS_ROOT}/tools/dfII/bin\ * ) then
set path = ($CDS_ROOT/tools/dfII/bin $path)
endif

# ------------------------
# NOTES:
# =. After instalation make sure that you have the follow link in :
#    ln -s tools./platform/ tools
# =. Tooladmin's customizable .cdsinit should be in ${CDS_ROOT}/.cdsinit
# =. The follow line need to be present in $HOME/.cdsinit if you have to run Calibre
#    load("$MGC_HOME/shared/pkgs/icv.ss6/tools/queryskl/calibre.skl")

Friday, October 23, 2009

How to runas in Win's XP a program with Admin privileges without password prompt?

Solved such way:

1. Create a BAT file with the following content in the directory "C:\Program Files\Dir_with_program_to_run\your_program_name_to_run.bat": (create "your_program_name_to_run.bat")

@REM ======= your.bat file ======
@runas /user:Your_Administrator_name /savecred "C:\Program Files\Dir_with_program_to_run\your_program_name_to_run.exe"
@REM ======= fin your.bat file ======

2. I modified the path of the shortcut from Desktop to point to the created BAT file.

3. Start the shortcut (double click ;) ). You will be prompted for password only once.
Enter the Your_Administrator_name password.

4. Close the program, start the program again. Program should start without asking you for a password again.

Simple, isn't it? Enjoy!

Thursday, October 22, 2009

How to install the MS SQL server 2000 A (or SP3) on Win's XP (solved)

If you get errors when installing the SQL 2000 server release A, follow these steps:

1. In the directory where is the "setup.exe" I made the BAT file "setup.bat" with the following content:

@REM ===========
@echo off
@setup.exe SAPWD="replace_with_your_admin_password" USERNAME="Your_Admin_name" /l*v setup.log
@REM setup.log will be created in the current run directory
@REM ===========

2. Enter to c:\windows\inf, then right click on "mdac.inf" and select "Install" from the popup
If prompted for CD, insert it and go to [Your_CD-Drive]:\i386

3. Open the Start->ControlPanel->Administrative Tools->Services
find here service: Terminal Services
double click, and make it "Disabled" in the StartupType, click OK, then restart the system.

4. now run the "setup.bat" created at step (1.) to install.

5. Check the setup.log file (from where you started the "setup.bat") you should see this at the end of log file:
"MSI (c) (B0:DC) [20:24:49:734]: Product: Microsoft SQL Server Desktop Engine -- Installation operation completed successfully."

6. Enable the Terminal Services (step 3.) (select the StartupType: ---> Manual) and restart computer.

PS: If the installation freeze follow instructions from here

Saturday, October 17, 2009

How to reset root password?

How to reset/recover the ROOT password in openSUSE?

Don’t have to mention the panic that kicks in when you have forgot or misplaced your root user password. Like most other operating systems, openSUSE helps you to recover or reset the root password from the console.


Please try the following to reset/recover root password. This should work on openSUSE 11.0 & openSUSE 10.x (tested on openSUSE 10.3):


1. Boot the system and select the normal boot menu from the list. Once selected, in the “Boot Options” box type

“init=/bin/bash” if you are using GRUB Boot loader

“linux init=/bin/bash” if you are using LILO Boot Loader, then at the prompt enter:

bash$> password
New password:*****
Confirm password:*****

Password updated successfully!
bash$> reboot

Enjoy!

Friday, October 16, 2009

How to copy from host and to host with visual speed control?

============================

The scp provide the speed connection statistic when active ...

more details on WikiPedia

Copying file to host:
scp SourceFile user@host:directory/TargetFile
Copying file from host:
scp user@host:directory/SourceFile TargetFile

Image below from here


Monday, October 12, 2009

how to enable in Vista (etc ...) clipboard tricks

If you don't know what I'm talking about read this article.

you can make in windows such thinks:


ctrl+g => append to clipboard new selection
ctrl+d => empthy clipboard
win+s => show clipboard content

These all are possible with: AutoHotKey

Check this tutorial: Tutorial

The script is:

; this code below enable append clipboard content

#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
^g::
clipboard = %clipboard%
ClipisSaved := clipboard
Send ^c
clipboard = %clipboard%
clipboard = %ClipisSaved%`r`n%clipboard%
;StringReplace, clipboard, ClipisSaved, 'n, clipboard
;MsgBox % ClipBoard
return

;this code below empthy clipboard
^d::
clipboard = ;
;MsgBox ClipBoard is Empthy!
return

;this code below show the content from the clipboard
#s:: MsgBox % ClipBoard

How to make the compilation faster (NetBeans) with NIS NFS server?

Hint:
We configured the NetBeans to store cache on local host (don't send on NIS).

To be continued ...

Friday, October 9, 2009

how to publish real html code on blog?

The code should be first encoded with HTML Encoder, after that inserted ;)

You can try with colors also Color Encoder

Before encode, html tags are executed (we want publish code!):

test page


After encode we can see all the code:

<html>
<title> Test </title>
<body>
<p>
Test page
</p>
</body>
</html>

how to pass php value to javascript?

Try this example: test.php

<?php
$test = 5;
echo 'OUTPUT: php_test='.$test;
?>
<html>
<body>
<script type="text/javascript">
test
= 3;
var test='<?php echo $test;?>';

document.write(
"js_test=" + test);
//alert("I am an alert box!");
</script>

</body>
</html>

Rezult:
OUTPUT: php_test=5 js_test=5

Eurica !

P.S.: The html tags can be published on blog if convert the code with HTML Encoder

The code should be first encoded with HTML Encoder, after that inserted ;)

You can try with colors also Color Encoder

Thursday, October 1, 2009

Redirect, Forward over ssh how to examples ...

===============
Example 1:
The user pinky enter in channel #users over ssh tunnel that start on localhost over 1234 TCP port and end on server.example.com (irc server) on port 6667 (standart IRC port)
# ssh -f -L 1234:localhost:6667 server.example.com sleep 10
# irc -c '#users' -p 1234 pinky 127.0.0.1

===============
Example2:
Multiple hops over ssh ...
# ssh -t user@server "ssh user@workstation2"
===============
Securing RDP with SSH tunnel

The SSH client software like PuTTY can be used connect to home SSH server from the office. From your computer at the office, SSH into the home "SSH Server" with PuTTY or by executing the following command from the prompt:

ssh –p ssh.port.number home.username@home.ip.address
You should now have a command prompt on the home "SSH Server". From there, execute the following command to enable traffic tunneling:

ssh -R 3390:home.ip.address:3389 -C -N office.username@office.ip.address
This will tunnel all traffic arriving from source office.username@office.ip.address port 3390 to destination home.ip.address port 3389. Now from your computer at the office, use your Remote Desktop client to connect to localhost:3390, this will connect you to the home computer. The Remote Desktop traffic will be tunneled over SSH. If localhost does not work, try to use 127.0.0.1:3390 on Windows XP SP1, or 127.0.0.2:3390 on Windows XP SP2. This is due to changes in TCP loopback interface that occurred in SP2.
===============

Friday, September 25, 2009

I have installed cygwin on Vista (full instalation), they've done a good job !!!

Here are some pictures from my tests ...
Tested the ssh connection on remote linux machine ...


Window export from linux to windows ... first steps


What about Circuit design aplications? Seems to be ok, ... :) Congratulations!

Tuesday, June 9, 2009

IC610 start error on OpenSuse 11.1 (Solved)

When starting IC610 on OpenSuse 11.1 I get the below ... (see solution)

Resource id: 0x4200011
Qt Warning: X Error: BadWindow (invalid Window parameter) 3
Major opcode: 18 (X_ChangeProperty)
Resource id: 0x4200011
Qt Warning: X Error: BadWindow (invalid Window parameter) 3
Major opcode: 18 (X_ChangeProperty)
Resource id: 0x4200011
Qt Warning: X Error: BadWindow (invalid Window parameter) 3
Major opcode: 20 (X_GetProperty)
Resource id: 0x4200011
Qt Warning: X Error: BadWindow (invalid Window parameter) 3
Major opcode: 18 (X_ChangeProperty)
Resource id: 0x4200011
Qt Warning: X Error: BadWindow (invalid Window parameter) 3
Major opcode: 19 (X_DeleteProperty)
Resource id: 0x4200011
Qt Warning: X Error: BadWindow (invalid Window parameter) 3
Major opcode: 8 (X_MapWindow)
Resource id: 0x4200011
\e Display :0.0 Error "BadMatch (invalid parameter attributes)"
\e request 1 error 8 serial 1439
\e Display :0.0 Error "BadDrawable (invalid Pixmap or Window parameter)"
\e request 153 error 9 serial 1440
\e Display :0.0 Error "BadWindow (invalid Window parameter)"
\e request 18 error 3 serial 1441
\e Display :0.0 Error "BadWindow (invalid Window parameter)"
\e request 18 error 3 serial 1442
\e Display :0.0 Error "BadWindow (invalid Window parameter)"

And so on ...

Solution:

Add following to your xorg.conf:

Section "Extensions"

Option "Composite" "Off"

EndSection

Enjoy ;)

Monday, May 25, 2009

Where is the serial for XP SP3?

For serial look in I386/UNATTEND.TXT or I386/WINNT.SIF

Enjoy

Thursday, March 12, 2009

How to make Horde3 to start in Administrator mode?

I have had this problem before - don't know why - but this is what I
did to get around it.

You need to run the database define stream that is appropriate for
you DB backend
/horde/scripts/sql/create.whateverdbyouhave

P.S.: I solved with database by running horde/scripts/setup.php

Then insert the default horde sql definition in conf.php

$conf['use_ssl'] = 2;

$conf['server']['name'] = $_SERVER['SERVER_NAME'];

$conf['server']['port'] = $_SERVER['SERVER_PORT'];

$conf['cookie']['domain'] = $_SERVER['SERVER_NAME'];

$conf['cookie']['path'] = '/horde';

$conf['debug_level'] = E_ALL & ~E_NOTICE;
$conf['umask'] = 077;
$conf['compress_pages'] = true;
$conf['session']['name'] = 'Horde';
$conf['session']['cache_limiter'] = 'nocache';
$conf['session']['timeout'] = 0;
$conf['auth']['admins'] = array('Administrator');
$conf['auth']['driver'] = 'auto';
$conf['auth']['params'] = array('username' => 'Administrator');
$conf['prefs']['driver'] = 'session';
$conf['menu']['always'] = false;
$conf['portal']['fixed_blocks'] = array();
$conf['imsp']['enabled'] = false;
$conf['kolab']['enabled'] = false;

$conf['log']['priority'] = PEAR_LOG_NOTICE;
$conf['log']['ident'] = 'HORDE';
$conf['log']['params'] = array();
$conf['log']['name'] = '/var/log/horde/horde3.log';
$conf['log']['params']['append'] = true;
$conf['log']['type'] = 'file';
$conf['log']['enabled'] = true;
$conf['log_accesskeys'] = false;

$conf['sql']['persistent'] = true;
$conf['sql']['username'] = 'horde';
$conf['sql']['password'] = '1_hordeadmin';
$conf['sql']['protocol'] = 'unix';
$conf['sql']['database'] = 'horde';
$conf['sql']['charset'] = 'utf-8';
$conf['sql']['splitread'] = false;
$conf['sql']['phptype'] = 'mysql';

then insert the datatree def in conf.php
$conf['datatree']['params']['driverconfig'] = 'horde';
$conf['datatree']['driver'] = 'sql';

Now you can open the Horde3 in Administrator mode and configure it normaly (this mean you type http://localhost/horde3)

======
When try to logout I got this "This request cannot be completed because the link you followed or the form you submitted was only valid for minutes. Please try again now"

Solved (see this link):

There is a math bug in the horde/lib/Horde.php checkRequestToken, the
paranthesis are missing :

instead of

if ($_SESSION['horde_form_secrets'][$token] +
$GLOBALS['conf']['urls']['token_lifetime'] * 60 < time()) {
return PEAR::raiseError(sprintf(_("This request cannot be
completed because the link you followed or the form you submitted was
only valid for %s minutes"),
$GLOBALS['conf']['urls']['token_lifetime']));
}

it should be

if (($_SESSION['horde_form_secrets'][$token] +
$GLOBALS['conf']['urls']['token_lifetime']) * 60 < time()) {
return PEAR::raiseError(sprintf(_("This request cannot be
completed because the link you followed or the form you submitted was
only valid for %s minutes"),
$GLOBALS['conf']['urls']['token_lifetime']));
}

no matter which setting you chose for token_lifetime - it will always
complain about that the link is no longer valid.
===========
Note:

if you have such message when loging in "Warning: Invalid argument supplied for foreach() in /ingo/lib/Block/overview.php on line 50"
this mean you have not created the database for INGO plughin

To do so, go to "horde/ingo/scripts/sql" and from there run:

# mysql -uroot -p database_passwd horde < ingo.sql



Enjoy.

Wednesday, March 4, 2009

VisualDRC, showing advise when drawing IC layout

Hi there my friend :)

This tool is very useful for layout designers. Why? Good question!
If you are such a designer you know how much it take for you to read and learn specific new technology rules to be able for fast design with optimal distances. It take some time to adapt with new design rules.
Now you can design faster, just follow the advise of this new wonderful tool "VisualDRC".

If you are interested in such tool, please contact the Micrologic Desing Automation or AsicArt


Visual DRC
VisualDRC™ is a EDA tool that check the design rules during the construction of an integrated circuit's layout block in real time mode.
VisualDRC™ is designed to provide advice, check and report violations. It is aimed for a fast, accurate, and efficient reliable verification during the construction of a mask layout database.
VisualDRC™ is equipped with simple-to-use and intuitive graphical interface.


Monday, March 2, 2009

Slow NFS solved on OpenSuse 11.0

Hi there
----------
1. First of all, the Raid 1 has been connected with one (2xhdd) IDE M-S connector, after Raid 1 (2xhdd) connected on different ports IDE also increased performance but still was slow.
----------
2. Then made these:

At the beginning export from NFS server was with these options:

#from /etc/exports
/exported_dir 10.0.0.0/24(rw, no_root_squash, sync, no_wdelay)

After I changed the "sync" to "async" the write speed performance increase was quite large.
P.S: "no_wdelay" with "async" is neglected.

Try "man 5 exports" to see all available options for export

Note: on clients the /etc/fstab mount line is:

#/etc/fstab
nisserv:/exported_dir /mount_path nfs defaults 0 0

The NFS server is on Piii 800MHz :D with 512MB Ram

Note: The man page says that async can be dangerous if the
NFS server daemon crashes as some data may not be committed to disk, but
this is always a risk (in my opinion anyways) since hard drives cache data
before it gets committed to disk anyways...


All the best, enjoy ;)

Tuesday, February 24, 2009

C/C++ executable running from Cadence with interprocess communication

When starting application I get this error:

==========
Error: Can't Start VisualDRC CORE

/home-nis/lis/VDRC/bin/VisualDRC: /tools/Cadence/lnx/ic_5_1_41_usr6/tools/lib/libgcc_s.so.1: version `GCC_4.2.0' not found (required by /usr/lib/libstdc++.so.6)

/home-nis/lis/VDRC/bin/VisualDRC: /tools/Cadence/lnx/ic_5_1_41_usr6/tools/lib/libgcc_s.so.1: version `GCC_3.3' not found (required by /usr/lib/libstdc++.so.6)
==========

When analyzing those libs I get the below:

[gvit@alfa]<~/work> 202 # ldd -v /usr/lib/libstdc++.so.6
linux-gate.so.1 => (0xffffe000)
libm.so.6 => /lib/libm.so.6 (0xb7e5d000)
libc.so.6 => /lib/libc.so.6 (0xb7d01000)
/lib/ld-linux.so.2 (0xb7f9a000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7ce2000)

Version information:
/usr/lib/libstdc++.so.6:
libm.so.6 (GLIBC_2.0) => /lib/libm.so.6
ld-linux.so.2 (GLIBC_2.3) => /lib/ld-linux.so.2
libgcc_s.so.1 (GCC_4.2.0) => /lib/libgcc_s.so.1
libgcc_s.so.1 (GLIBC_2.0) => /lib/libgcc_s.so.1
libgcc_s.so.1 (GCC_3.3) => /lib/libgcc_s.so.1
libgcc_s.so.1 (GCC_3.0) => /lib/libgcc_s.so.1
libc.so.6 (GLIBC_2.3.2) => /lib/libc.so.6
libc.so.6 (GLIBC_2.1) => /lib/libc.so.6
libc.so.6 (GLIBC_2.3) => /lib/libc.so.6
libc.so.6 (GLIBC_2.1.3) => /lib/libc.so.6
libc.so.6 (GLIBC_2.0) => /lib/libc.so.6
libc.so.6 (GLIBC_2.2) => /lib/libc.so.6
/lib/libm.so.6:
ld-linux.so.2 (GLIBC_PRIVATE) => /lib/ld-linux.so.2
libc.so.6 (GLIBC_2.1.3) => /lib/libc.so.6
libc.so.6 (GLIBC_2.0) => /lib/libc.so.6
/lib/libc.so.6:
ld-linux.so.2 (GLIBC_PRIVATE) => /lib/ld-linux.so.2
ld-linux.so.2 (GLIBC_2.3) => /lib/ld-linux.so.2
ld-linux.so.2 (GLIBC_2.1) => /lib/ld-linux.so.2
/lib/libgcc_s.so.1:
libc.so.6 (GLIBC_2.1.3) => /lib/libc.so.6
libc.so.6 (GLIBC_2.2.4) => /lib/libc.so.6
libc.so.6 (GLIBC_2.0) => /lib/libc.so.6
----------------------------

[gvit@alfa]<~/work> 204 # strings /tools/Cadence/lnx/ic_5_1_41_usr6/tools/lib/libgcc_s.so.1 | grep ^GCC
GCC_3.0

and the system /libgcc_c.so.1 show:

[gvit@alfa]<~/work> 205 # strings /lib/libgcc_s.so.1 | grep ^GCC
GCC_3.0
GCC_3.3
GCC_3.3.1
GCC_3.4
GCC_3.4.2
GCC_4.0.0
GCC_4.2.0
GCC_4.3.0
GCC_4.4.0

TEMPORARY SOLUTION:


1. The old libgcc_s.so.1 from the Cadence library can be linked to the system library.
linux# cd cadence_install_dir/tools/lib

2. Backup the Cadence libgcc_s.so.1
linux# mv libgcc_s.so.1 libgcc_s.so.1.bkp

3. Make symlink to the libgcc_s.1 from the system /lib directory
linux# ln -s /lib/libgcc_s.so.1 libgcc_s.so.1

P.S.: Need further solution

EASY SOLUTION (less modifications and not correct!)

- in .cdsinit file set this
;---
;overwriting LD_LIBRARY_PATH
printf("Old settings for LD_LIBRARY_PATH:\n");
getShellEnvVar("LD_LIBRARY_PATH")
printf("Overwriting LD_LIBRARY_PATH ...\n")
setShellEnvVar("LD_LIBRARY_PATH=/lib")
printf("New settings for LD_LIBRARY_PATH:\n");
getShellEnvVar("LD_LIBRARY_PATH")
;---

FINAL SOLUTION (the correct solution! yes!)

P.S.: solved after I read this: all about LD_LIBRARY_PATH

1. I made a script that call the C/C++ executable:
linux# cat > VisualDRC
#now input the below
#!/bin/sh
export LD_LIBRARY_PATH=/lib
exec ${VDRC_HOME_DIR}/bin/VisualDRC.exe $@

linux# chmod a+x VisualDRC

Enjoy, this is the correct solution

Cadence IC5141_usr6 install solution

Hi my friend :)

When trying to install from ../CDROM1/SETUP.SH I get this error message:
---------------
/bin/tar: Removing leading `/' from member names

Could not set up SoftLoad ../install_path
---------------
Solution:

- edit the SETUP.SH and add for all "tar xf" => "tar xfP" with "P" option

P.S.: if you have the errors below then look for this solution

/bin/tar: -b1: Not found in archive
/bin/tar: Error exit delayed from previous errors
/bin/tar: -b1: Not found in archive
/bin/tar: Error exit delayed from previous errors

To aviod another error, remove the leading (-) from the tar -xfP => (tar xfP)

Friday, February 20, 2009

Cadence cdsdoc problem and solution in OpenSuse 11.1

Hi there
===========
1.First of all I try to run "cdsdoc -test" from a terminal and get this message:

[gvit@ws09]<~> 210 # cdsdoc -test

CDSDoc 2.1 Installation verification

Check system - Linux ws09 2.6.27.7-9-pae #1 SMP 2008-12-04 18:10:04 +0100 i686 i686 i386 GNU/Linux
Checking installation directory... Done.
Checking user environment variables... Done.
Checking Netscape, make sure Netscape 4.51 (or higher) is in your PATH ...

--- Warning: Netscape NOT found ---

Checking Directory Structure...
Directory Structure Check passed
Done.

================
2. This I solved such way:
- login as root
- make a file "netscape" in "/usr/bin"
- write these lines below and save file:
*****
#!/bin/sh
exec firefox $@
*****
- change permision of "netscape" to all executable:
chmod a+x /usr/bin/netscape
===============
3. Now run "cdsdoc -test" should look like this:
[gvit@ws09]<~> 207 # cdsdoc -test

CDSDoc 2.1 Installation verification

Check system - Linux ws09 2.6.27.7-9-pae #1 SMP 2008-12-04 18:10:04 +0100 i686 i686 i386 GNU/Linux
Checking installation directory... Done.
Checking user environment variables... Done.
Checking Netscape, make sure Netscape 4.51 (or higher) is in your PATH ...
Mozilla Firefox 3.0.6, Copyright (c) 1998 - 2009 mozilla.org
Checking Directory Structure...
Directory Structure Check passed
Done.
==============
4. Running command "cdsdoc &" and clicking "Search" button can show this error:
[gvit@ws09]<~> 209 # CDSDoc, version 2.1
Copyright © 2000-2003, Cadence Design Systems, Inc.
Starting browser ...
./https: error while loading shared libraries: libstdc++-libc6.1-1.so.2: cannot open shared object file: No such file or directory
================
5. You can solve this such way:
- login as root
- type command "zypper install compat"


Now everything should be ok
All the best ;)

Wednesday, February 18, 2009

Monday, February 16, 2009

Acer Aspire One 150 bb resolution change in OpenSuse 11.1

Initially had a few problem with setting up native resolution in my Suse. When testing a new setting through sax everything was fine, but after restarting X, system was defaulting into 640x480 with only top left part of the screen visible. So my redemption was as follow:
1. running following command:
Quote:
~> gtf 1024 600 60

gives you modeline settings for your screen:
Quote:
# 1024x600 @ 60.00 Hz (GTF) hsync: 37.32 kHz; pclk: 48.96 MHz
Modeline "1024x600_60.00" 48.96 1024 1064 1168 1312 600 601 604 622 -HSync +Vsync

P.S.: I modified the line a little such way:
Modeline "1024x600" 48.96 1024 1064 1168 1312 600 601 604 622 -HSync +Vsync
You can see, I removed frequency 60.00

2. copy above into your xorg.conf, which can be found in /etc/X11/:
Quote:
Section "Modes"
Identifier "Modes[0]"
# 1024x600 @ 60.00 Hz (GTF) hsync: 37.32 kHz; pclk: 48.96 MHz
Modeline "1024x600" 48.96 1024 1064 1168 1312 600 601 604 622 -HSync +Vsync
EndSection

3. Start YaST and navigate to System / "etc/sysconfig editor".
Then Desktop/Display Manager/DISPLAYMANAGER_RANDR_MODE_auto and replace the default settings with:
1024x600_60 48.96 1024 1064 1168 1312 600 601 604 622 -HSync +Vsync
Alternatively you can manually edit it directly in: /etc/sysconfig/displaymanager

4. Restart your X (or reboot)

Enjoy :)

Friday, February 13, 2009

how to check all IP's and Mac's from network

Hi there,
I use in Linux and windows command "arp -a" for this.


how to check ports on LAN network (aslo WAN)

Good afternoon, Mr. or Miss.

To check if a port is open in linux I use "nmap":
Example:

linux# nmap -v your_ip -p your_port

or

linux# nmap -v your_ip

for more options use "man nmap"
================
In windows I use command "netstat"

Example:

C:>netstat -tl

or

C:>netstat -tln

Try them, they are very useful for a network hacker

Tuesday, February 10, 2009

mp-202 Voice IP in OpenSuse 11.0

The main task was to open tcp and udp (specific Voice IP provider settings) in OpenSuse 11.0 server firewall.

To do that, open in terminal as "root"
linux# yast2
Then go to Security and Users->Firewall
Switch to Expert Mode and go to Custom Rules.
Click "Add" buton and input the needed settings:
Source Network: 0/0 (this mean from all IP)
Protocol: Tcp or Udp
Destination Port: xx...
Source Port: xx...

Go to "Start-up" and click "Save Settings and Restart Firewall Now"
That's all, enjoy :)

File transfer via SSH

SSH allows the use of pipelines controls, and use inputs / outputs pipes as any other commands , on the basis that redirection is done to or from the remote machine.

This may be used to transfer files:

ssh server "cat remote_file" > local_file


The fact that the scp command does exactly the same thing, the usefulness of such a command is questionable,
but imagine that you need to transfer a file of several mega, using a fairly limited bandwidth:

ssh server "gzip -c remote_file" > local_file.gz


Here, the server compress the file, the command used will write the compressed file on the client machine.

It can go even further if you do not want to retrieve a gzipped file, but still want to lower bandwidth usage:
ssh server "gzip -c remote_file " |gunzip > local_file


=======

Using this method effectively sends the compressed tarball to the terminal. You then pipe that into an ssh session which is running the extract version of the previous tar function along with the change directory argument. This, essentially, sends the compressed tarball into a decompression process at the other end over a secure ssh "pipe".

The result is a pretty quick file transfer which - as the data is being sent in a compressed GZIP form (of BZip2 if you replace the z with a j in the tar functions) you save on bandwidth too.

Here an an example of how to do this, assuming you are in (for example) /var/www/html/ and the website you want to transfer is the folder www.example.com.

tar czf - www.example.com/ | ssh joebloggs@otherserver.com tar xzf - -C ~/

This will send the entire www.example.com folder over to the home folder on your target server in compressed form over and encrypted connection.
================================
CONCLUZION:

1. - to get from server directory or file
ssh username@from_server "tar czf - directory_to_get" | tar xvzf - -C path_where_to_put

2. - to send directory to another host
tar czf - directory_to_send | ssh username@to_server "tar xzf - -C path_where_to_put"

Enjoy :*

Monday, February 9, 2009

multiple ip in linux

in linux (maybe in windows to) we can add multiple IP, and what is interesting, that one can be achieved by dhcp and another set static by adding an alias with static ip, and this all for one NIC.

in OpenSuse look in /etc/sysconfig/network/... for all configurations files of ifcfg-eth* (where * may be 0, 1, etc) also look here in file "routes"

how to add multiple gateway's in linux

I saw in windows we can add more gateways the same can we do in linux with command:

linux# route add -net 0.0.0.0/0 gw your_gateway_ip

we can check our routing table with command:
linux# route -n
or
linux# ip route sh

in OpenSuse 11.0 you can read about command "insserv", that is very useful when you want to make a script that is loaded at boot time

OpenSuse 11.0 Example:
---
Make file
linux# vi /etc/init.d/gateway

add there:
#!/bin/sh
route add -net 0.0.0.0/0 gw your_gateway_ip
-- save and close the file

and do also
linux# chmod a+x /etc/init.d/gateway

After that make it to start at boot time: (we cannot put it in /etc/init.d/boot.local because the NIC's aren't up)
linux# insserv -v -d /etc/init.d/gateway

For more details look in documentation.