HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- ODBC Connections
Operating System - HP-UX
1826451
Members
4026
Online
109692
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2000 05:44 AM
12-18-2000 05:44 AM
ODBC Connections
Is there some way to tell via the UNIX shell that there is an ODBC connection to a database on the machine? I am running HPUX 10.20, the database is Ingres 6.4. I know how I can do it via the database monitor applications, but I will have to write a long complicated script, and I was (of course) wishing for an easier way.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2000 06:05 AM
12-18-2000 06:05 AM
Re: ODBC Connections
Yes, you can use lsof, download and install lsof from this site if you don't have it already installed : http://gatekeep.cs.utah.edu/hppd/hpux/Sysadmin/lsof-4.51/
#lsof |grep databasename|pg . Run this at the command prompt.
#lsof |grep databasename|pg . Run this at the command prompt.
When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2000 07:11 AM
12-18-2000 07:11 AM
Re: ODBC Connections
Tracey, try
root:L1000>:lsof -iTCP:7001
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
usqlsd 13732 root 3u inet 0x10243fe68 0t0 TCP *:7001 (LISTEN)
I know port 7001 is being used by my ODBC program usql, and it is TCP.
If you don't have a copy and are running 64 bit, here is the binary in gzip format. If you do a search through this site for lsof there is a ton of info.
root:L1000>:lsof -iTCP:7001
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
usqlsd 13732 root 3u inet 0x10243fe68 0t0 TCP *:7001 (LISTEN)
I know port 7001 is being used by my ODBC program usql, and it is TCP.
If you don't have a copy and are running 64 bit, here is the binary in gzip format. If you do a search through this site for lsof there is a ton of info.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2000 07:23 AM
12-18-2000 07:23 AM
Re: ODBC Connections
Tracey, to list the files in use by my OBDC I use, with partial listing:
root:L1000>:lsof -c usqls
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
usqlsd 13732 root cwd VDIR 64,0x5 1024 8760 /usr/usqls/bin
usqlsd 13732 root txt VREG 64,0x5 1200244 11926 /usr (/dev/vg00/lvol5)
usqlsd 13732 root mem VREG 64,0x5 127445 704 /usr/lib/libm.1
usqlsd 13732 root mem VREG 64,0x5 126976 721 /usr (/dev/vg00/lvol5)
usqlsd 13732 root mem VREG 64,0x7 41183 1162 /opt/cobol/cobdir/cobl
ib/libmfo.1
usqlsd 13732 root mem VREG 64,0x7 165171 1165 /opt/cobol/cobdir/cobl
ib/liboops.1
usqlsd 13732 root mem VREG 64,0x7 20523 1159 /opt/cobol/cobdir/cobl
ib/libmbcs.1
usqlsd 13732 root mem VREG 64,0x7 197443 1149 /opt/cobol/cobdir/cobl
ib/libfhutil.1
If you are looking for a specific users:
root:L1000>:lsof -u loumf
root:L1000>:lsof -u loumf
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
ksh 2296 loumf cwd VDIR 64,0x9 32768 2 /usr/FACDTA
ksh 2296 loumf txt VREG 64,0x5 163840 11843 /usr/bin/ksh
ksh 2296 loumf mem VREG 64,0x5 679936 17954 /usr/lib/libnsl.1
ksh 2296 loumf mem VREG 64,0x5 126976 2397 /usr/lib/libxti.2
ksh 2296 loumf mem VREG 64,0x5 20480 693 /usr/lib/libdld.2
ksh 2296 loumf mem VREG 64,0x5 1462272 16647 /usr/lib/libc.2
ksh 2296 loumf mem VREG 64,0x5 126976 15483 /usr/lib/dld.sl
root:L1000>:lsof -c usqls
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
usqlsd 13732 root cwd VDIR 64,0x5 1024 8760 /usr/usqls/bin
usqlsd 13732 root txt VREG 64,0x5 1200244 11926 /usr (/dev/vg00/lvol5)
usqlsd 13732 root mem VREG 64,0x5 127445 704 /usr/lib/libm.1
usqlsd 13732 root mem VREG 64,0x5 126976 721 /usr (/dev/vg00/lvol5)
usqlsd 13732 root mem VREG 64,0x7 41183 1162 /opt/cobol/cobdir/cobl
ib/libmfo.1
usqlsd 13732 root mem VREG 64,0x7 165171 1165 /opt/cobol/cobdir/cobl
ib/liboops.1
usqlsd 13732 root mem VREG 64,0x7 20523 1159 /opt/cobol/cobdir/cobl
ib/libmbcs.1
usqlsd 13732 root mem VREG 64,0x7 197443 1149 /opt/cobol/cobdir/cobl
ib/libfhutil.1
If you are looking for a specific users:
root:L1000>:lsof -u loumf
root:L1000>:lsof -u loumf
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
ksh 2296 loumf cwd VDIR 64,0x9 32768 2 /usr/FACDTA
ksh 2296 loumf txt VREG 64,0x5 163840 11843 /usr/bin/ksh
ksh 2296 loumf mem VREG 64,0x5 679936 17954 /usr/lib/libnsl.1
ksh 2296 loumf mem VREG 64,0x5 126976 2397 /usr/lib/libxti.2
ksh 2296 loumf mem VREG 64,0x5 20480 693 /usr/lib/libdld.2
ksh 2296 loumf mem VREG 64,0x5 1462272 16647 /usr/lib/libc.2
ksh 2296 loumf mem VREG 64,0x5 126976 15483 /usr/lib/dld.sl
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Support
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP